teh interwebz
RSS icon Home icon
  • Controlling Twitter SMS notifications through code

    Posted on June 1st, 2009 Josh Highland No comments

    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”.

  • phpBB admin password manual reset

    Posted on March 31st, 2009 Josh Highland No comments

    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.

  • no place like home (and end keys) on a mac

    Posted on March 19th, 2009 Josh Highland No comments

    keyfixer

    I never noticed how often I use the “home” and “end” keys when I type until they were taken away from me. I am a programmer by trade, and as a result, I type code all day long. On a PC the end key will take you to the end of a line, and the home key will bring you to the beginning of a line. On a mac, this functionality doesn’t exist. It’s simple missing! It just makes a “ding” at me

    Maybe it would be different if I was using a mac keyboard with my mac mini. Right now I am using a KVM switch to share my microsoft mouse and keyboard with my PC and my Mini. As a result, My mind and hands continue to type and work just like I was coding using a PC. “DING DING DING” damn its annoying. I had no idea i hit those keys so often, but the mini does a good job at reminding me :(

    I tried to live with it but it got old fast. I decided to do a google search for “home end keys mac” to see if there was a fix for this. The first result was a God send. keyfixer is a tiny application for pc-to-mac switchers like me, that remaps your keyboard and adds back the functionality of the home and end keys.

    It’s amazing how much more productive I feel just by having those 2 keys back. I guess after 15+ years of typing/programing for a living, the home and end keys are a perminiate part of my arsenal and I will never underestimate their power ever again.

  • Manually reset your WordPress password

    Posted on February 13th, 2009 Josh Highland No comments

    lost-wordpress-password

    It doesn’t matter what application your working with, losing your password is always a pain in the ass. Luckly if you are working with wordpress (man, I blog a lot about wordpress these days), on your server and you have access to the MySql database, resetting your password manually is a snap.

    • Login to your PhpMyAdmin
    • Select your WordPress database and click on the “SQL” button to open the SQL query window.

    wordpress-phpmyadmin

    • Paste the following code in the window textarea. (Don’t forget to modify the password and username before executing it)

    UPDATE ‘wp_users’ SET ‘user_pass’ = MD5(’PASSWORD’) WHERE ‘user_login’ =’admin’;

    That’s it! Your password has been reset, and you should be able to login to your wordpress admin area once again.

    
    								
  • Modifying MimboPro to Add Paged Navigation To Category Pages

    Posted on December 8th, 2008 Josh Highland 3 comments

    Recently I have been doing a lot of work with Wordpress. I love Wordpress. one of the things I like most about Wordpress is the plugins and themes.

    I recently bought a copy of the MimboPro theme. Mimbo is clean and very professional. More of a CMS theme then a blogging theme, prefect for what I want to use it for.

    As I dug into MimboPro and Wordpress, I realized something strange, the MimboPro theme doesn’t support paging in a category view. What this means is EVERY SINGLE post you make is shown on one page. If you have a very active site, like the one I’m working on, this quickly gets out of hand. Look at this image and you will see what I mean (click for full version).

    One of the reasons I like MimboPro was the support that the authors of the theme offer. I headed over to their message forums and found other people like me asking for the Additon of Paged Navigation To Category Pages. The original post was 8 months ago, and no one had resolved anything. I made a post to the MimboPro authors only to be told that there is going to be a new theme that will handle this and it will be available at a deep discount to MimboPro owner. This upset me a bit, so taking matters into my own hand, I fixed what Mimbo wont, and I am handing out my own patch to solve this issue. Below are the instructions to hack your own files, or you can just download my zip file with the pre-hacked files.

    Pre-Hacked Files:
    Download with pre-hacked files: JoshHighlands_MimboPro_CategoryPagingHack.zip

    DIY INSTRUCTIONS (click images for full sizes):

    1. Save a copy of your current categories.php and styles.css files inside of the MimboPro theme directory to a safe location
    2. Open up categories.php inside of the MimboPro theme directory, and find line 17
    3. Comment line 17 with a double back slash (//)
    4. Go to line 87 of category.php and add the following code
    5. Save and close category.php
    6. Open up style.css inside of the MimboPro theme directory
    7. Add the following CSS code to the bottom of the file (should be close to line 852)
    8. Save styles.css
    9. Upload categories.php and styles.css to the MimboPro theme directory on your server
    10. Everything should be working. Here is what my wordpress running MimboPro looks like

    That’s it! MimboPro will now have paging in all of the categories. The next and previous links will only show up when you have enough posts. The Wordpress default is 10 posts. You can edit the number of posts by going to change the number of posts to show on a category page, go into to the admin and under “setting” > “reading” you will find the option, as highlighted here.

    If you had any problem reading the code in the image files, download the zip files with the pre-hacked files in them.

    Download with pre-hacked files: JoshHighlands_MimboPro_CategoryPagingHack.zip

    If you have any further questions, please post them in the comment.