Skip to content

Instantly share code, notes, and snippets.

View ssaunier's full-sized avatar

Sébastien Saunier ssaunier

View GitHub Profile
@benpickles
benpickles / minify
Created January 4, 2011 21:17
Swiftly concat and minify JavaScript files from the command line
#!/usr/bin/env ruby
dry_run = ARGV.delete('--dry-run')
force = ARGV.delete('--force')
if ARGV.empty?
puts <<-USAGE
minify, swiftly concat and minify JavaScript files from the command line
Pass a single argument to create a .min.js version:
@jpmckinney
jpmckinney / twitter.add_self_to_list.rb
Created June 1, 2011 23:33
Add yourself to your Twitter list
# blog post: http://blog.slashpoundbang.com/post/6087617126/how-to-add-yourself-to-your-own-twitter-list
#!/usr/bin/env ruby
require 'twitter'
# Replace the four strings below with your own values.
Twitter.configure do |config|
config.consumer_key = 'CONSUMER_KEY'
config.consumer_secret = 'CONSUMER_SECRET'
config.oauth_token = 'OAUTH_TOKEN'
config.oauth_token_secret = 'OAUTH_TOKEN_SECRET'
@coreyhaines
coreyhaines / .rspec
Last active April 11, 2024 00:19
Active Record Spec Helper - Loading just active record
--colour
-I app
@happy15
happy15 / gist:2179728
Created March 24, 2012 07:40
wired benchmark: cuba vs sinatra
simple.rb
=========
require 'sinatra'
use Rack::CommonLogger
get '/' do
'hello'
end
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@matthewlein
matthewlein / .jshintrc
Created April 30, 2012 17:03
JShint git pre-commit hook
{
"devel": false,
"undef": true
}
@maccman
maccman / juggernaut.rb
Created June 26, 2012 02:49
Sinatra Server Side Event streaming.
# Usage: redis-cli publish message hello
require 'sinatra'
require 'redis'
conns = []
get '/' do
erb :index
end
@jpinnix
jpinnix / gist:3186304
Created July 27, 2012 05:25
Installing Ruby 1.8.7-p358 with rbenv on Mountain Lion
Follow the instructions here: The Hitchhiker's Guide to Riding a
Mountain Lion http://j.mp/Qm5UJD, including installing XQuartz.
After installing XQuartz set the correct path to the X11 library to
install Ruby 1.8.7-p358 with rbenv:
export CPPFLAGS=-I/opt/X11/include
then let the compiler know where gcc-4.2 is:
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 2, 2024 03:13
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@josephwecker
josephwecker / new_bashrc.sh
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo: https://github.com/josephwecker/bashrc_dispatch
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# -- DEPRICATED --
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch
# (Thanks gioele)
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?