Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am glennr on github.
  • I am glennrob (https://keybase.io/glennrob) on keybase.
  • I have a public key whose fingerprint is D2C0 4AD2 276E C6CC 6F1C 91BC C7D7 09B8 D688 8ACA

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am glennr on github.
* I am glennrob (https://keybase.io/glennrob) on keybase.
* I have a public key whose fingerprint is A116 1BB1 8A55 FED3 0991 44D9 97CD 22CC C005 CD65
To claim this, I am signing this object:
#A little script to convert all your .erb views to .haml using html2haml, which is included with Haml installation.
#Just drop this in your rails root folder and run it.
#
# Original Author: http://snippets.dzone.com/posts/show/5449
#
# GlennR: 2009 09 09 - Improved output. (I didnt have hpricot installing and the script wasnt telling me otherwise!)
#
class ToHaml
def initialize(path)
### RAILS SHORTCUT GLORY
#
# printf "\033[0m0 All attributes off\033[0m\n"
# printf "\033[1m1 Bold\033[0m\n"
# printf "\033[4m4 Underline\033[0m\n"
# printf "\033[5m5 Blink\033[0m\n"
# printf "\033[7m7 Invert\033[0m\n"
# printf "\033[8m8 Hide\033[0m8 = Hide\n"
# printf "\033[30m30 Black\033[0m30 = Black\n"
export EDITOR='mate -w'
export GIT_EDITOR='mate -wl1'. #This instructs TextMate to open with the caret at line 1 rather than where it last was.
#!/bin/sh
# Install ImageMagick on Snow Leopard: by kain, improved by mislav and samsoffes
# Updated by glenn roberts to include libiconv, and the latest stable ImageMagick
#
# http://www.icoretech.org/2009/08/install-imagemagick-in-leopard-snow-leopard/
# Work with 64bit kernel mode
set -e
PREFIX=/usr/local
alias gphm='git push heroku master'
alias hmig='heroku rake db:migrate'
alias hlog='heroku logs'
alias hopen='heroku open'
  require 'posterous'

  reader = Posterous::Reader.new("siyelo", nil, 2)

  reader.response.each do |post|
    puts post['url']
    puts post['link']
    puts post['title']

puts post['body']

# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# http://gist.github.com/47546
function parse_git_dirty {
git diff --quiet HEAD &>/dev/null
[[ $? == 1 ]] && echo "*"
}
function parse_git_branch {
local branch=$(__git_ps1 "%s")
#!/bin/sh
###
# Bash shell script to convert filenames with
# uppercase + spaces to lowercase + underscores
# E.g.
# Moving "Goudy Old Style BT.ttf" to "goudy_old_style_bt.ttf"
#
# Author: Glenn Roberts
#