Skip to content

Instantly share code, notes, and snippets.


Paul Stamatiou stammy

View GitHub Profile
jrk / newpost.rb
Created May 5, 2009 — forked from al3x/newpost.rb
Creates a new Jekyll post, opens it in TextMate, and adds to the git index
View newpost.rb
#!/usr/bin/env ruby
require Dir
unless ARGV[0]
puts 'Usage: newpost "the post title"'
blog_root = "/Users/jrk/proj/blog"
View IRC_mention_notifier.rb
# PROBLEM: when someone replies to you publicly in an IRC channel you may not be
# notified of it if you are away from your computer. The common format for public
# replies looks like this:
# <jchris> maxo_: yeah mine is way better
# SOLUTION: Sign up for notifo as both a supplier and a consumer, and install the
# notifo app on your smartphone. Execute this in cron every minute to have new
# mentions sent to your phone as push notifications.
View notifo_to_google_voice.php
Easy to use sms notifications from Notifo
Super quick hack by Harper - @harper -
Get Google-Voice-PHP-API:
View notifo.php
class Notifo_API {
const API_ROOT = '';
const API_VER = 'v1';
protected $apiUsername;
protected $apiSecret;
stammy / launch_term_tabs.scpt
Created Oct 14, 2010
Launch a series of commands in new OS X Terminal tabs
View launch_term_tabs.scpt
-- How to use: you can either run manually in applescript editor or open Automator
-- and select run applescript and paste this code where it tells you
-- then save that automation as an application. pro tip: go to sys prefs, accounts, login items
-- and add it there to launch on boot :)
-- provide the commands you want to open here.
-- want to run multiple in the same tab? just use a semicolon to separate the commands
-- these are just dummy commands. i usually launch redis-server, tail my error log, launch sass, and do a git status on my project dir
View move_to_rds.rb
require 'fileutils'
start_time =
:name => 'db_name',
:user => 'db_user',
:password => 'db_pass',
:host => 'localhost'
View .htaccess
RewriteEngine On
# Map to /jekyll.
RewriteRule ^$ /jekyll/ [L]
# Map to /jekyll/x unless there is a x in the web root.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/jekyll/
RewriteRule ^(.*)$ /jekyll/$1
aliang / application_controller.rb
Created Feb 1, 2011
Force SSL on Devise routes only, then redirect back
View application_controller.rb
class ApplicationController < ActionController::Base
# Tell Devise to redirect after sign_in
def after_sign_in_path_for(resource_or_scope)
some_url(:protocol => 'http')
# Tell Devise to redirect after sign_out
def after_sign_out_path_for(resource_or_scope)
some_url(:protocol => 'http')
mikegehard /
Created May 5, 2011 — forked from netzpirat/
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard
troyk / whyme.js
Created Oct 12, 2011
Get a list of email addresses from your gmail sent folder using node
View whyme.js
// Based off an example from node-imap, will output a list of email addresses from your
// gmail sent folder (so you can copy/paste to the BCC field and let people know your
// sorry for using the same password all over the internet resulting in your buddies
// getting a lame spam message)
var ImapConnection = require('imap').ImapConnection,
imap = new ImapConnection({
username: '{{replace}}',
password: '{{replace}}',
host: '',
You can’t perform that action at this time.