Skip to content

Instantly share code, notes, and snippets.

@bruno-c
bruno-c / f7u12talker.js
Created June 1, 2011 13:59
f7u12 faces plugin for talker
/* Written by @vincentsimard */
/*
Converts f7u12 faces code into images
See http://www.reddit.com/r/fffffffuuuuuuuuuuuu/comments/ecnd4/every_fffffffuuuuuuuuuuu_face_a_reference_guide for reference
Does not support titles, or any other cool features
Type [/code] to use the face in Talker.
*/
plugin.F7U12Faces = function(matcher){
this.matcher = matcher;
@maccman
maccman / juggernaut_heroku.md
Created June 2, 2011 01:26
Juggernaut on Heroku

Clone repo:

git clone git://github.com/maccman/juggernaut.git
cd juggernaut

Create Heroku app:

heroku create myapp --stack cedar
heroku addons:add redistogo:nano

git push heroku master

@jrom
jrom / udplisten.js
Created June 9, 2011 09:36
Listens to an UDP port and logs received messages
var dgram = require('dgram');
var server = dgram.createSocket('udp4', function (msg, rinfo) {
console.log(msg.toString());
});
server.bind(8125);
@jamesu
jamesu / Capfile.rb
Created June 23, 2011 21:47
Deploying chef with capistrano
# Deploying chef with capistrano
# Requires a typical chef config layout, i.e.
# cookbooks/
# nodes/
# roles/
#
# Commands:
# configure:<node> - Upload chef cookbooks, run chef-solo
#
# Roles will automatically be added from nodes/*.json. e.g. if you have
@bobisme
bobisme / gist:1078482
Created July 12, 2011 17:29
Build/install custom linux kernel headers in ubuntu.

Linux Headers

  • Install tools to build:
sudo apt-get update
sudo apt-get install kernel-package fakeroot wget bzip2
  • Linux-2.6.39.1-linode34 is same as regular 2.6.39
@jamesu
jamesu / roar.sh
Created July 27, 2011 10:24
Disable all the annoying features in OSX Lion
# Commands to disable all the annoying features in OSX Lion
# Fork if you've got any more ideas!
# NOTE: most of these commands seem to need a restart to work
# Press and hold (i.e. fix key autorepeating)
defaults write -g ApplePressAndHoldEnabled -bool false
# Window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO
@javan
javan / gist:1168475
Created August 24, 2011 16:32
Fix iPhone home button
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/
1.) Open any application
2.) Press and hold the power button until the slide to shutdown swipe bar appears.
3.) Release Power button
4.) Press and hold Home button Lightly
until screen returns to icon screen
@metaskills
metaskills / wait_until.rb
Last active May 2, 2024 01:51
Never sleep() using Capybara!
# WAIT! Do consider that `wait` may not be needed. This article describes
# that reasoning. Please read it and make informed decisions.
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations?
describe 'Modal' do
should 'display login errors' do
visit root_path
@mutsuda
mutsuda / supertail
Created October 14, 2011 20:25
Colored tail -f version: With this shellscript you'll be able to see your system/server logs with personalized colors in personalized lines containing certain words.
#!/bin/bash
function usage
{
echo "usage: supertail -f file [-bl word1 -m word2 -g word3 -w word4 -bk word5 ...] "
echo "bl=blue, bk=black, g=green, m=magenta, r=red, c=cyan, w=white, y=yellow, etc."
}
@nicholasjhenry
nicholasjhenry / your_application.rb
Created October 22, 2011 04:56
PayRoll application, embedded in Rails, borrowing from Use Case Driven Architecture and DCI
## PayRoll gem
# lib/pay_roll.rb
module PayRoll
class << self
attr_accessor :employee_directory
def config
yield self
end
end