Skip to content

Instantly share code, notes, and snippets.

View jmhobbs's full-sized avatar

John Hobbs jmhobbs

View GitHub Profile
@jmhobbs
jmhobbs / ios5_notify.sh
Created October 12, 2011 16:51 — forked from jerodsanto/ios5_notify.sh
Siri, tell me when iOS 5 is available. Nothing? Fine. Bash, you do it.
#!/bin/bash
:(){ echo "Checking for iOS 5: `date`"; curl -s -L http://phobos.apple.com/version | grep Restore | grep iPhone | grep 5.0 > /dev/null && say "I O S 5 IS NOW AVAILABLE. GO GET YOUR DOWNLOAD ON, KID" || echo "Nothing yet..." && sleep 30 && :; };:
@jmhobbs
jmhobbs / chunker.py
Created August 31, 2011 18:48 — forked from squarepegsys/chunker.py
Get Python list in chunks
#!/usr/bin/env python
import unittest
from itertools import cycle
## get a list in chunks
## if we run out of items in the list, start again from the beginning
class Chunker(object):
# -*- coding: utf-8 -*-
# Copyright (c) 2010 John Hobbs
#
# http://github.com/jmhobbs/googlecode-irc-bot
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell