Reverse engineer. Blogger.

Posts tagged open source

In 2009 I scrawled together a simple PHP script that tweeted links based on an RSS feed. I then updated it to support OAuth and open sourced it on GitHub. I haven’t really touched it since (though I get about 3 emails a month about it). Just a small update here and there. This morning, […]

Read more...

Disappearing apps and services

Alexei Baboulevitch (archagon) in a comment on Hacker News: These indie apps are often marketed as beautiful, wholesome alternatives to grimy corporate or open source software, but how could I possibly rely on these products for essential tasks like note-taking if they’re just going to disappear out from under me in a few years? The […]

Read more...

Linus Torvalds in 2004 on the Linux Kernel Mailing List (LKML): To me, the biggest thing with small patches is not necessarily the patch itself. I think that much more important than the patch is the fact that people get used to the notion that they can change the kernel – not just on an […]

Read more...

GoPro just updated their iOS app. In the release notes I noticed a link to their developer page wherein they’ve open sourced their Camera Toolkit for iOS and Android. Let’s hope a ton of bug fixes result so I can stop hacking mine.

Read more...

Richard Lander on the .NET Blog: We are excited to announce the release of .NET Core 1.0, ASP.NET Core 1.0 and Entity Framework Core 1.0, available on Windows, OS X and Linux! .NET Core is a cross-platform, open source, and modular .NET platform for creating modern web apps, microservices, libraries and console applications. They said they would, and […]

Read more...

RSS to Twitter using PHP

[ad#Adsense: Horiz 468]

Update January 19, 2010: This script is now available on GitHub. Go forth and fork.

Today I noticed that my now ancient PHP script to update Twitter automatically using PHP/cron needed to be updated. It turns out that Twitter stopped recognizing URLs with ? in them as clickable links. Here is an example tweet where you’ll notice this happening.

I could have told Twitter and asked that they update the way they handle URLs but in reality my script was old, slow, too long, and shouldn’t include ? anyway so I figured I’d write a new one from scratch that included my short URL scheme.

So, here is the PHP script to parse an RSS feed and send the posts to Twitter. It includes a caching mechanism so that you won’t have duplicate URLs posted to Twitter. If you want it, take it. However, if you are better than I am at PHP (most 6yr. olds are better than I am at programming) then I ask that you fork the script on Gist and try to improve it.

Update Dec. 6 @ 5:34p: Kyle Slattery, follow Viddler team member, loves him some Ruby on Rails. As such he’s offered up this version of the script rewritten in Ruby.

Next up we have Anthony Sterling, self-proclaimed “PHP addict”, who has rewritten the script to make the configuration a bit easier. He also changed the way the cache is saved. He’s using a hashed version of the title for each post as his key. I do not believe this to be the best way to go, since post titles can easily change after publishing – but I do like that the script is about 20 lines shorter and the code is arguably cleaner.

Thanks to both Kyle and Anthony for their versions. Lets keep this going and see if we can get this script much more succinct, stable, faster, and usable by others?

Read more...