Skip to content
Showing user profile of selected author: -

Huginn: Monitor changes in websites

The Huginn software is not only good for monitoring Twitter feeds, it can also be used to monitor websites for changes.

That's actually easy and needs only two agents:

 

 

Continue reading "Huginn: Monitor changes in websites"
  • Twitter
  • Bookmark Huginn: Monitor changes in websites at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Huginn: Monitor changes in websites
  • Bloglines Huginn: Monitor changes in websites
  • Technorati Huginn: Monitor changes in websites
  • Fark this: Huginn: Monitor changes in websites
  • Bookmark Huginn: Monitor changes in websites at YahooMyWeb
  • Bookmark Huginn: Monitor changes in websites at Furl.net
  • Bookmark Huginn: Monitor changes in websites at reddit.com
  • Bookmark Huginn: Monitor changes in websites at blinklist.com
  • Bookmark Huginn: Monitor changes in websites at Spurl.net
  • Bookmark Huginn: Monitor changes in websites at Simpy.com
  • Bookmark Huginn: Monitor changes in websites at blogmarks
  • Bookmark Huginn: Monitor changes in websites with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Django: disable inline option to add new referenced objects

The Django Web Framework makes it quite easy to add new referenced objects in the admin menu.

Let's say the model has two foreign keys in it:

class TeamMember(models.Model):
    team = models.ForeignKey(Team, on_delete=models.CASCADE, verbose_name=_("Team"))
    user = models.ForeignKey(CustomUser, on_delete=models.CASCADE, verbose_name=_("User"))

And the admin form:

class TeamMemberForm(forms.ModelForm):
    class Meta:
        model = TeamMember

class CustomTeamMemberAdmin(admin.ModelAdmin):
    form = TeamMemberForm
    add_form = TeamMemberForm
    model = TeamMember
    fieldsets = [
        (None,      {'fields': ['team', 'user']}),
    ]

admin.site.register(TeamMember, CustomTeamMemberAdmin)

Then Django will show small a small green "Django add reference" sign next to the fields:

Continue reading "Django: disable inline option to add new referenced objects"
  • Twitter
  • Bookmark Django: disable inline option to add new referenced objects at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Django: disable inline option to add new referenced objects
  • Bloglines Django: disable inline option to add new referenced objects
  • Technorati Django: disable inline option to add new referenced objects
  • Fark this: Django: disable inline option to add new referenced objects
  • Bookmark Django: disable inline option to add new referenced objects at YahooMyWeb
  • Bookmark Django: disable inline option to add new referenced objects at Furl.net
  • Bookmark Django: disable inline option to add new referenced objects at reddit.com
  • Bookmark Django: disable inline option to add new referenced objects at blinklist.com
  • Bookmark Django: disable inline option to add new referenced objects at Spurl.net
  • Bookmark Django: disable inline option to add new referenced objects at Simpy.com
  • Bookmark Django: disable inline option to add new referenced objects at blogmarks
  • Bookmark Django: disable inline option to add new referenced objects with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Volkswagen Golf 8

Vor einer Weile standen wir vor dem Problem dass wir ein neues Auto brauchen.

Zu den Gründen warum wir dann doch ab und zu ein Auto brauchen, und warum es kein Elektroauto geworden ist, steht mehr am Ende des Artikels.

Nachdem feststand, dass wir ein neues Auto brauchen, haben wir eine Weile gesucht, Probe  gefahren, Autohäuser besucht ect. Manches hat uns nicht gefallen, bei manchen Autohäusern sind wir auf unfreundliche Verkäufer gestoßen, manche haben sich nie wieder gemeldet. Der größte Teil war jedoch in Ordnung. Letztendlich hatten wir eine Liste von drei verschiedenen Angeboten, und haben uns dann für einen Golf 8 (Modell 2021, in schwarz, ganz wichtig, mit Schiebedach, auch ganz wichtig) entschieden.

Der Golf ist ein grundsolides Auto. Verarbeitung und Aufbau sind in Ordnung. Man merkt dem 8er aber an, dass Volkswagen krampfhaft versucht das Auto “online” zu bringen und mit digitaler Technik voll zu packen. Hier sind meine Beobachtungen nachdem das Auto jetzt eine Weile hier ist.
 

 

Continue reading "Volkswagen Golf 8"
  • Twitter
  • Bookmark Volkswagen Golf 8 at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Volkswagen Golf 8
  • Bloglines Volkswagen Golf 8
  • Technorati Volkswagen Golf 8
  • Fark this: Volkswagen Golf 8
  • Bookmark Volkswagen Golf 8 at YahooMyWeb
  • Bookmark Volkswagen Golf 8 at Furl.net
  • Bookmark Volkswagen Golf 8 at reddit.com
  • Bookmark Volkswagen Golf 8 at blinklist.com
  • Bookmark Volkswagen Golf 8 at Spurl.net
  • Bookmark Volkswagen Golf 8 at Simpy.com
  • Bookmark Volkswagen Golf 8 at blogmarks
  • Bookmark Volkswagen Golf 8 with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Search objects based on a specific criteria (Key:name:etymology) in JOSM

This posting is mainly a reference for myself, because I was looking for this specific issue a couple times.

OpenStreetMap (OSM) is a map of the world, created by anyone who wants to contribute. It so happens that data might be missing (just go and add it, if you see that something is not on the map). It also happens that someone adds too much data.

In my case someone added "Wikidata" entries to each and every footpath.The OSM folks in Berlin made a great effort to find the etymology of names, and add them to Wikidata. And then link the street names to the Wikidata entries. That's nice and very useful, but it's enough to do that for streets. Not for every path, including the underground parking.

I raised this in the Berlin Telegram channel, and we agreed that it's best to keep the etymology tags to the main streets. Now I had to find all the entries which were tagged with a Wikidata entry, and update most of them.

 

Continue reading "Search objects based on a specific criteria (Key:name:etymology) in JOSM"
  • Twitter
  • Bookmark Search objects based on a specific criteria (Key:name:etymology) in JOSM at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Search objects based on a specific criteria (Key:name:etymology) in JOSM
  • Bloglines Search objects based on a specific criteria (Key:name:etymology) in JOSM
  • Technorati Search objects based on a specific criteria (Key:name:etymology) in JOSM
  • Fark this: Search objects based on a specific criteria (Key:name:etymology) in JOSM
  • Bookmark Search objects based on a specific criteria (Key:name:etymology) in JOSM at YahooMyWeb
  • Bookmark Search objects based on a specific criteria (Key:name:etymology) in JOSM at Furl.net
  • Bookmark Search objects based on a specific criteria (Key:name:etymology) in JOSM at reddit.com
  • Bookmark Search objects based on a specific criteria (Key:name:etymology) in JOSM at blinklist.com
  • Bookmark Search objects based on a specific criteria (Key:name:etymology) in JOSM at Spurl.net
  • Bookmark Search objects based on a specific criteria (Key:name:etymology) in JOSM at Simpy.com
  • Bookmark Search objects based on a specific criteria (Key:name:etymology) in JOSM at blogmarks
  • Bookmark Search objects based on a specific criteria (Key:name:etymology) in JOSM with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Add a Google Calendar to openHAB

openHAB can integrate Google Calendars. The functionality is kind of limited, it can only see the current and the next calendar event, but in my case that is enough. More about the use case in another blog post.

There are three different calendar bindings available, let's have a quick look:

  • CalDAV Personal Binding: this is a v1 binding, which means it will no longer work in the soon-to-be-released openHAB v3. Apparently this works with Google calendars, but has performance issues. It can show the current and next event.
  • Google Calendar Scheduler: also a v1 binding. Needs more work for presense simulation, and additional bindings.
  • iCalendar Binding: v2 binding, should work with v3. It can show the current and next event. That's the one I'm going to use.

 

Continue reading "Add a Google Calendar to openHAB"
  • Twitter
  • Bookmark Add a Google Calendar to openHAB at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Add a Google Calendar to openHAB
  • Bloglines Add a Google Calendar to openHAB
  • Technorati Add a Google Calendar to openHAB
  • Fark this: Add a Google Calendar to openHAB
  • Bookmark Add a Google Calendar to openHAB at YahooMyWeb
  • Bookmark Add a Google Calendar to openHAB at Furl.net
  • Bookmark Add a Google Calendar to openHAB at reddit.com
  • Bookmark Add a Google Calendar to openHAB at blinklist.com
  • Bookmark Add a Google Calendar to openHAB at Spurl.net
  • Bookmark Add a Google Calendar to openHAB at Simpy.com
  • Bookmark Add a Google Calendar to openHAB at blogmarks
  • Bookmark Add a Google Calendar to openHAB with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

git pre-commit Hooks

A very common use case for hooks in git is a "pre-commit" hook. This hook is used to verify the to-be-committed data before it is added to the repository.

One important note: hooks are not part of the repository itself. Everyone can install a hook on it's own checkout of a repository, but by default the hook is not there when you clone/checkout the repository. This avoids security problems by executing arbitrary code during "git commit", or any "git" operation.
Because of this implication it is common that developers install a hook from somewhere in the repository into the ".git/hooks" directory. And in addition, the server side (the repository) can run the same checks during "git push", to enforce the rules.

Hooks in git work in a simple way: whatever program or script is run as the hook has to set a return code. If the return code is "0", git proceeds. If it's not "0", git aborts the operation.

 

Continue reading "git pre-commit Hooks"
  • Twitter
  • Bookmark git pre-commit Hooks at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg git pre-commit Hooks
  • Bloglines git pre-commit Hooks
  • Technorati git pre-commit Hooks
  • Fark this: git pre-commit Hooks
  • Bookmark git pre-commit Hooks at YahooMyWeb
  • Bookmark git pre-commit Hooks at Furl.net
  • Bookmark git pre-commit Hooks at reddit.com
  • Bookmark git pre-commit Hooks at blinklist.com
  • Bookmark git pre-commit Hooks at Spurl.net
  • Bookmark git pre-commit Hooks at Simpy.com
  • Bookmark git pre-commit Hooks at blogmarks
  • Bookmark git pre-commit Hooks with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

openHAB: faster loading of rules files

openHAB rules files are lazy loaded. When a rule is used the first time, the entire rule file is loaded and compiled, which apparently is single-threaded and takes a couple seconds. Even on a reasonable powerful Rasperry Pi 4. This happens both after restarting openHAB and after changing the rules file. It also means that whatever the rule in question is supposed to do has to wait a couple seconds when requested for the first time. Imagine you have a light switch, enter a room, press the switch, and it takes 5-10 seconds until the light comes on.

To work around this problem, I add a piece of code in all rules files which triggers an immediate action right after loading the file. This way the rules file is already pre-loaded (which again takes a couple seconds, but likely at a time when the rule is not needed right now).

 

Continue reading "openHAB: faster loading of rules files"
  • Twitter
  • Bookmark openHAB: faster loading of rules files at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg openHAB: faster loading of rules files
  • Bloglines openHAB: faster loading of rules files
  • Technorati openHAB: faster loading of rules files
  • Fark this: openHAB: faster loading of rules files
  • Bookmark openHAB: faster loading of rules files at YahooMyWeb
  • Bookmark openHAB: faster loading of rules files at Furl.net
  • Bookmark openHAB: faster loading of rules files at reddit.com
  • Bookmark openHAB: faster loading of rules files at blinklist.com
  • Bookmark openHAB: faster loading of rules files at Spurl.net
  • Bookmark openHAB: faster loading of rules files at Simpy.com
  • Bookmark openHAB: faster loading of rules files at blogmarks
  • Bookmark openHAB: faster loading of rules files with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Remove duplicates from Huginn event stream

One of the things I'm using Huginn for is monitoring for Twitter keywords. Some of them might appear in pairs, as example people like to tag Tweets about PostgreSQL with both #postgresql and #postgres. When I was using IFTTT this always created two emails, one for each hashtag. With Huginn I can deduplicate the events, and only notify about the first occurrence.

I need the following agents for this scenario:

 

 

Continue reading "Remove duplicates from Huginn event stream"
  • Twitter
  • Bookmark Remove duplicates from Huginn event stream at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Remove duplicates from Huginn event stream
  • Bloglines Remove duplicates from Huginn event stream
  • Technorati Remove duplicates from Huginn event stream
  • Fark this: Remove duplicates from Huginn event stream
  • Bookmark Remove duplicates from Huginn event stream at YahooMyWeb
  • Bookmark Remove duplicates from Huginn event stream at Furl.net
  • Bookmark Remove duplicates from Huginn event stream at reddit.com
  • Bookmark Remove duplicates from Huginn event stream at blinklist.com
  • Bookmark Remove duplicates from Huginn event stream at Spurl.net
  • Bookmark Remove duplicates from Huginn event stream at Simpy.com
  • Bookmark Remove duplicates from Huginn event stream at blogmarks
  • Bookmark Remove duplicates from Huginn event stream with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Enable Huginn Twitter integration

Huginn comes with a number of Twitter agents, but before they can be used you need to authenticate them. That process requires multiple steps, and they are not well documented.

The basics are described on the "Configuring OAuth applications" Wiki page.

For the Twitter integration one must know that you are using a single Twitter app for all users, but every Huginn user can (and should) have this app authenticated against their own Twitter account. Therefore if you want to use multiple Twitter accounts in Huginn, you need multiple Huginn users.

 

Continue reading "Enable Huginn Twitter integration"
  • Twitter
  • Bookmark Enable Huginn Twitter integration at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Enable Huginn Twitter integration
  • Bloglines Enable Huginn Twitter integration
  • Technorati Enable Huginn Twitter integration
  • Fark this: Enable Huginn Twitter integration
  • Bookmark Enable Huginn Twitter integration at YahooMyWeb
  • Bookmark Enable Huginn Twitter integration at Furl.net
  • Bookmark Enable Huginn Twitter integration at reddit.com
  • Bookmark Enable Huginn Twitter integration at blinklist.com
  • Bookmark Enable Huginn Twitter integration at Spurl.net
  • Bookmark Enable Huginn Twitter integration at Simpy.com
  • Bookmark Enable Huginn Twitter integration at blogmarks
  • Bookmark Enable Huginn Twitter integration with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Monitor software version changes with Huginn

Huginn is a great piece of software, but the documentation is ... a bit sparse. Especially when it comes to details of the agents. I'm going to blog about a couple more more examples in the future.

For another project I'm using Leaflet, a JavaScript library for rendering maps in a browser. New versions are released occasionally, and I want to know when it's time to update the project website. Huginn can do that.

 

Continue reading "Monitor software version changes with Huginn"
  • Twitter
  • Bookmark Monitor software version changes with Huginn at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Monitor software version changes with Huginn
  • Bloglines Monitor software version changes with Huginn
  • Technorati Monitor software version changes with Huginn
  • Fark this: Monitor software version changes with Huginn
  • Bookmark Monitor software version changes with Huginn at YahooMyWeb
  • Bookmark Monitor software version changes with Huginn at Furl.net
  • Bookmark Monitor software version changes with Huginn at reddit.com
  • Bookmark Monitor software version changes with Huginn at blinklist.com
  • Bookmark Monitor software version changes with Huginn at Spurl.net
  • Bookmark Monitor software version changes with Huginn at Simpy.com
  • Bookmark Monitor software version changes with Huginn at blogmarks
  • Bookmark Monitor software version changes with Huginn with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca