Controlling Twitter SMS notifications through code

twitter sms

It’s not secret my current favorite tech toys are my iPhone and Twitter.

I follow several hundred people of interest, and regularly use TwitterFon Pro, TweetDeck and Twitter.com to keep up with them all. For an elite group of people I follow on twitter I choose to have their updates pushed to me via SMS (text message) to my phone.

Sometimes I’m in area where I dont have reliable service to my phone (most of the meeting rooms at my work for some reason), and Twitter will try to send me an SMS message telling me that one of my good friends just made a tweet. If Twitter cant deliver that tweet for some reason, like the phone doesnt have service, Twitter simply stops sending message to your phone. There has been many times where i have thought to myself “damn Twitter is quiet today”, then I log onto Twitter.com and see a “is you device have trouble?” error. If i don’t go check the website, I have no idea that Twitter turned off SMS updates to my phone. Twitter is cool but they aren’t cool enough to send you an email saying “Hey your phone is screwed up, we are going to stop sending you SMS message until you fix it”. Atleast then the poor bastards like me who are addicted to twitter would know what we have to do.

Because I am such a Twitter addict, I have come up with a plan to end my frustrations with this problem. The solution? Use some evil “robots” to do my bidding. I have blogged about them before, I am talking about Cron and Curl. okokok, so they aren’t evil robots they are software running on my computer.

Twitter has an awesome API (Application Programming Interface) that allows you to do all sorts of sweet things using REST based http requests, including turning on and off SMS notifications to your phone.

cURL is an application that allows you to connect to web addresses from a command line.

cron is an application that allows you run application at scheduled intervals.

Can you guess where this is all going? Here is mathematical representation for you
((Twitter API + cURL) * cron(30 minutes)) = Happy Josh Highland

I have cron run the following command every 30 minutes (replace username and password with your own of course)

/usr/bin/curl -u user:password -d device=sms http://twitter.com/account/update_delivery_device.xml

I will never need to log onto twitter to turn on my SMS notifications ever again. In the event that Twitter disables notifications to my phone, every 30 minutes my evil robots enable MS messages to my phone. At most I will have 30 minutes of down time. I can live with that.

This is a perfect example of what one of my Computer Science professors told me… “If you have to do it more then 2 times write a script to do it for you”.

Swine Flu Zombies

swine kiss

I’m not one to panic about outbreaks, I laughed in the face of SARS and the Bird Flu but this Swine Flue has me kind of worked up. I’m also not one for conspiracy theories, but I think this Swine Flu deal is way more serious then we are being told. When the state of Texas closes down ALL sporting events in an attempt to stop it’s spread, you know something is up. People are demanding we close the boarder to Mexico, Obama is addressing it nationally, this is some major stuff! Living less then 2oo miles from Mexico, the place this all started, isn’t settling either.

swinemap

With the help of the all powerful Google, you can track outbreaks in real time. Things like this don’t make me feel any better.

I like to think of people with Swine Flu as “The infected”, kind of like a zombie movie… 28 days later / I am legend, etc. FREAKING INFECTED ZOMBIES WHO ARE COMING AFTER ME!

zombies

How the notPopular.com podcast is made

podcast_icon

Some of you blog reading people might know that I have a fairly well known podcast called the “notPop podcast”, that centers around music news and the activities of my site, notPopular.com. for almost 2 years now @xFLORIDAx and I have been churning these podcasts out and having a lot of fun doing it.

From time to time I get people emailing me asking how we record and put the podcast out onto the web. I’m going to be honest, it wasn’t easy to figure out, but we made it through. I’m going to tell you how we record our podcast, so that it might help you figure out how to do yours.

If you are un-familiar with my podcast, There is a minimum of 2 mics, but up to 8. We also play music and take listener calls.

The notPop podcast format is as follows:

  • intro music
  • welcome / introduction / catch up
  • featured band
  • news stories
  • throwback band
  • feedback from callers
  • ending statements
  • outro music
  • outro bonus clip

That might look like a lot of stuff to take on if you are un-familiar with recording audio on a computer. Don’t worry, I will walk you through it. (Disclaimer: I use Windows Vista for podcasting, but this will also work on Windows XP)

First off since we do have so many mics running at once, we need to capture all that audio at once. One solution is to just have one mic that everyone talks into. You can do that if you want your podcast to sound like crap. I don’t suggest it. Another way is to use a sound mixer board, and professional mics. That’s pricey and requires a lot of know how and fancy audio cards installed in your computer. I don’t suggest this method either. The best way I have found to get multiple mics working at the same time is USB headsets.

USB headsets are cheap and offer great sound quality. The real advantage is that each USB headset will act as their own sound input to the system so you have will have sound control over each device. I personally like to use the “Logitech Premium USB Headset 350”, you can get them cheap online, about $25 each.

350headset

Once you have them hooked up, windows will see them. Go to the control panel and go to recording devices. I like to set each mic to 30%. I have found that this is the best setting to prevent clipping. Clipping happens when a sound input is higher then can be recorded. when clipping occures, you lose out on the data trying to be recorded and you end up sounding like crap.

For recording software, I use Adobe Audition. It’s super powerful. Inside the application, you will see multiple time lines. I assign each time line to a input (remember that each USB mic is its own input!). I leave an open time line for sound clips and songs. Arm the tracks to record, press the record button and start talking into the mics. You should see the sound coming in.

adobeaudition

Once in a while we press the stop button and drag in an mp3 or wav file to be played. Once its in place, we set the timeline right after the clip and start recording again. We do this for the intro and exit music, along with the songs and listener calls we take.

For listener calls, I use skype with the skypeIn option. With sypeIn you get a phone number and a voicemail box. By default, you cant save the voicemails that people leave you in skype. I use a software package called PrettyMay to save the voice mails and calls as mp3 files. I use the PrettyMay Call Recorder for Skype, it costs $24 for a license with free upgrades for lifetime. After I save all the calls to mp3s, I can drag them into the time line in Adobe Audition, just like the songs we play.

Once all the audio is finished and complete in Adobe Audition, I export the raw WAV file by going to file->export audio. The export takes a while to complete.

After the WAV is exported, I import it into Audacity, and export it out as a 128kbps mp3 file. You need the LAME MP3 Encoder to export mp3s from audacity

audacity_mp3export

Once you have the mp3 exported, listen to it (or atleast spot check it)! You want to make sure your rad new podcast sounds good. This is the final product, the rest of the post will be on how to deliver it to the listeners.

A podcast is simple an entry in an RSS feed with a media file enclosures. I’m not going to go into details on how to do this, but Apple has a great page on how to get your podcast into iTunes.

notPopular.com is powered by WordPress and I use a wordpress plugin called BlubrryPowerPress to syndicate the podcast to the site and to iTunes.

itunes

That’s basically it! I love podcasting and have been doing it for several years now. If you have some questions, leave them in the comments below..

phpBB admin password manual reset

phpbb_logo

Today I ran into a situation where I had forgotten the password to my development instance of phpBB 3. I was stuck in a situation were I needed to reset the password. I had full admin access to the database, so changing it there wouldn’t be the problem. The real problem is that phpBB uses its own password hashing, not MD5.

In a work around, I created a new user and used the password “123456” looking at the database , in the users table of the phpBB install. I saw the “user_password” field was “e10adc3949ba59abbe56e057f20f883e”.

I then changed my admin accounts user to the same string, “e10adc3949ba59abbe56e057f20f883e”.

phpbbpasswordreset

I went to the phpBB login screen, fillled out my username, and entered the password “123456”… BINGO! it worked.

So to save you the work. You can follow what I did or just use these hashes to reset your own password:

Hash: e10adc3949ba59abbe56e057f20f883e
Password: 123456

Hash: $H$9Ae3Uk.ECdWW5ya13M4ErWhr4c.761/
Password: password

I hope this helps someone else out there.

How to embed YouTube Videos in HD format

youtubehd-vertical

YouTube.com is now offering two video formats on their site, standard and high def (HD), but they only allow an option for you to embed the standard version. This tutorial is going to show you how to get maximum quality and take advantage of the HD videos that you embed in your blog posts or social networking profiles.

Step 1: Copy this code and paste it to wherever you intend to embed the video:







Step 2: Grab the direct link to your video. In case you’ve never done this before, it can be found to the right of the video player on YouTube or from your browser’s address bar.

gaburl

Step 3: copy the alphanumeric URL varialbe at the end of the link you grabbed in step 2.

urlvars

Step 4: The finishing touch involves making a simple change to embed’s URL source code to direct it to the HD version. To do this, you simply need to paste what you copied in step 3 into the part between /v/ and the & symbol in the embed code. I’ve labeled this “YOURVIDEOCODEHERE” in the embed code in Step 1.

Normal quality:


HD Quality: