19 posts tagged “Twitter”
@alastair_hm: Ghost Blog, Docker compose example Docker Compose Tutorial Running through the Docker… http://bit.ly/1qAp3LG
Note: 1 of this post’s 2 links is now broken — mostly deleted or made-private Flickr photos, dead Flickr
farmNsubdomains, and defunct feed-syndication infrastructure. Left as originally published.
Ghost Blog, Docker compose example Docker Compose Tutorial Running through the Docker… http://bit.ly/1qAp3LG
— Alastair Montgomery (@alastair_hm) April 9, 2016
http://twitter.com/alastair_hm
@alastair_hm: Owncloud running on Docker Owncloud Running on Docker Just a quick test getting ownCloud to… http://bit.ly/1qeVrD1
Note: 1 of this post’s 2 links is now broken — mostly deleted or made-private Flickr photos, dead Flickr
farmNsubdomains, and defunct feed-syndication infrastructure. Left as originally published.
Owncloud running on Docker Owncloud Running on Docker Just a quick test getting ownCloud to… http://bit.ly/1qeVrD1
— Alastair Montgomery (@alastair_hm) April 9, 2016
http://twitter.com/alastair_hm
@alastair_hm: Automated Nginx Reverse Proxy for #Docker · http://bit.ly/1Q0L0Io
Note: 2 of this post’s 3 links are now broken — mostly deleted or made-private Flickr photos, dead Flickr
farmNsubdomains, and defunct feed-syndication infrastructure. Left as originally published.
Automated Nginx Reverse Proxy for #Docker · http://bit.ly/1Q0L0Io
— Alastair Montgomery (@alastair_hm) April 9, 2016
http://twitter.com/alastair_hm
@alastair_hm: @deradam still waiting for mine to be delivered :(
Note: all 2 links in this post are now broken. Left as originally published.
@deradam still waiting for mine to be delivered :(
— Alastair Montgomery (@alastair_hm) April 9, 2016
http://twitter.com/alastair_hm
@alastair_hm: RT @linuxtoday: Docker: building and publishing custom docker images: HowToForge: Learn how to build customer docker images. http://bit.ly/1oLRaWC
Note: 1 of this post’s 2 links is now broken — mostly deleted or made-private Flickr photos, dead Flickr
farmNsubdomains, and defunct feed-syndication infrastructure. Left as originally published.
Docker: building and publishing custom docker images: HowToForge: Learn how to build customer docker images. http://bit.ly/1oLRaWC
— Linux Today (@linuxtoday) April 9, 2016
http://twitter.com/alastair_hm
No static external IP on Raspberry Pi
To keep me updated on the current IP I wrote a Ruby script which I run via crontab to check and Tweet me is the IP address changes.
#!/usr/bin/rubyrequire 'open-uri'require 'twitter'twitDM = "twitter_username"remote_ip = open('http://whatismyip.akamai.com').readold_ip = File.open('remote_ip.txt', 'r').readif (remote_ip != old_ip) thenFile.open('remote_ip.txt', "w") { |file| file.write(remote_ip)}client = Twitter::REST::Client.new do |config|config.consumer_key = "xxxx"config.consumer_secret = "xxxx"config.access_token = "xxxx"config.access_token_secret = "xxxx"endclient.update("D #{twitDM} My IP address is now #{remote_ip}")elseputs "IP addresses match"end
You can clone the script at Github https://github.com/alastairhm/myip it uses a Ruby Twitter API library which can be found at https://github.com/sferik/twitter to do the direct message with the new IP.
Full details about getting your Twitter API keys can be found at https://dev.twitter.com/
Doodle's Geek Monkey by Alastair Montgomery
Ruby Script to send Twitter mentions over serial port
# Find your Twitter Mentions and send them to Arduino on Serial Portrequire “rubygems” require “twitter” #https://github.com/sferik/twitter for config details require “serialport” #http://rubygems.org/gems/serialport require “pp”
prevID = 0 puts “Setting Up Serial Port” myport = SerialPort.new("/dev/ttyACM0",“9600”.to_i) sleep(10) while true puts “Checking for mentions” latestMention = Twitter.mentions(:count => 1)[0] if prevID != latestMention.id msg = latestMention.user.screen_name + " " + latestMention.text puts “-” + msg bytes = myport.write(msg) puts “-” + bytes.to_s prevID = latestMention.id else puts “-No new updates” end sleep 60 end myport.close
Doodle’s Geek Monkey by Alastair Montgomery
Some Debug Required
Testing writing the same message from the Arduino IDE gives the same results so looks like problem is in the Arduino code. Maybe the message is too long for the LCD's buffer?
The Twitter to Serial port Ruby script can be found at https://github.com/alastairhm/arduino/tree/master/SerialMessage
Doodle's Geek Monkey by Alastair Montgomery
Ruby Script to get Twitter mentions
# Find your Twitter Mentionsrequire “rubygems” require “twitter” #https://github.com/sferik/twitter for config details require “pp”
prevID = 0 while true latestMention = Twitter.mentions(:count => 1)[0] if prevID != latestMention.id msg = latestMention.user.screen_name + " " + latestMention.text #puts msg.size puts msg prevID = latestMention.id else puts “No new updates” end sleep 60 end
Sending Arduino messages over serial port
Note: 1 of this post’s 6 links are now broken — mostly dead 2008–2013 feed-syndication infrastructure (FeedBurner, Gawker, AOL’s old blog network, Pheedo, Yahoo Pipes). Left as originally published.
Idea was to use it to display tweets, just need to write the Ruby code to get the tweet and send it over the serial port now.
Here is the first version of the sketch uploaded to the Arduino.
All code can be found at https://github.com/alastairhm/arduino.git
// Auto scroll a message on the LCD and receive new messages via Serial port. // Alastair Montgomery (c) 2013 // Version 1.00 // include the library code: #include <LiquidCrystal.h> #include <string.h>// initialize the library with the numbers of the interface pins // below for SainSmart LCD Shield LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
Twitter from Ruby
Looking good so far, got my Twitter Dev key setup and have made a test post from a Ruby script.
1. Tweeting from Ruby
2......
3. Profit!!!
Doodle's Geek Monkey by Alastair Montgomery
Approaching 9000
Note: 1 of this post’s 7 links are now broken — mostly dead 2008–2013 feed-syndication infrastructure (FeedBurner, Gawker, AOL’s old blog network, Pheedo, Yahoo Pipes). Left as originally published.
Noticed that I’m approaching the 9000th Tweet mark on my Twitter account, this is scary so I decided to map my Tweeting habits again using http://tweetstats.com/
Doodle’s Geek Monkey by Alastair Montgomery
Baker Tweet
Check out how bakers can tell their Twitter followers that goodies have just come out of the oven by using BakerTweet.
Would only work if you had a favorite local baker you visited all the time?
BakerTweet from POKE on Vimeo.
Doodle’s Geek Monkey by Alastair Montgomery
Remote control using Twitter
I have been thinking about running task on a Ubuntu Linux machine remotely using Twitter. Why you ask, due to firewall restriction where the machine is located I can’t get direct access to it but it has connection out to the internet.
- I send a direct message to a Twitter account which only follows me and I follow on my main account.

- This contains the code for type of download and the URL of the download.
- The Python script is started by cron at scheduled times.
- The script connects to Twitter and checks for direct messages.
- It parses the direct message and either spawns a WGET or youTube-dl command to get the resource.
- If its a video it then runs a command is run to convert it to divX ready for upload it to my phone.
- If its a file then it is virus checked.
- Finally the direct messages are deleted from the Twitter account and a reply sent to my Twitter account.
Tweet from the command line with Twidge
Note: 14 of this post’s 23 links are now broken — mostly dead 2008–2013 feed-syndication infrastructure (FeedBurner, Gawker, AOL’s old blog network, Pheedo, Yahoo Pipes). Left as originally published.
For the longest time I refused to see the value in Twitter. Over the last six months I have changed my tune on that. Now I use Twitter primarily as a PR tool for my articles. And since my renewed belief in micro-blogging, I have found plenty of tools with which to enact with Twitter.
Twitter on Lynx
URL Shortening Rant
URL shortening is a great idea for Twitter’s 120 character limit but it does have its problems. Most annoying, you find an interesting link and click on it and get presented with the screen above. There is nothing you can do to get to the article you clicked on until the server load goes down.
Other problems include you don’t know what site you will end up on so can end up on a phishing site or something NSFW, although TinyURLs preview option kind of helps that problem.
Geek Chart
A Geek Chart is a web badge that shows where you share stuff online.
Each slice of the Geek Chart is a link to your profile on sites like Flickr, Twitter, Youtube and more.
Here is my chart.
Alastair_hm’s Geek Chart
Doodle’s Geek Monkey by Alastair Montgomery
Many Feeds to Feed

I sat down and mapped out how all my internet feeds map together.
The main gathering point is my Twitter account.
I also seem to have a Twitter addiction which can be seen from this graph
November 2008 looks like when I discovered TwitterFeed to like my other post through to my Twitter account.
Doodle’s Geek Monkey by Alastair Montgomery


