Skip to content

Instantly share code, notes, and snippets.

View rchampourlier's full-sized avatar

Romain Champourlier rchampourlier

View GitHub Profile
@hdorio
hdorio / revprox.go
Created June 13, 2017 13:12
reverse proxy qui dump la reponse du service dans un fichier
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httputil"
_ "net/http/pprof"
@kylefox
kylefox / gist:4512777
Created January 11, 2013 18:15
If you want to use Xcode's FileMerge as your git mergetool, this is how you set it up.
# Tell system when Xcode utilities live:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
# Set "opendiff" as the default mergetool globally:
git config --global merge.tool opendiff
@paulnicholson
paulnicholson / powssl
Last active November 24, 2021 16:40
ssl with pow using stud

Instructions

  • Install stud $ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
  • Download and install the powssl script $ curl https://gist.githubusercontent.com/paulnicholson/2050941/raw/7e4d2178e3733bed18fdfe737277c3cb72241d39/powssl > ~/bin/powssl $ chmod +x ~/bin/powssl
  • Run powssl to create development certificate and configure stud.
  • $ powssl
@bradmontgomery
bradmontgomery / apt_postgresql_ppa.rb
Created February 10, 2012 22:33
To install PostgresSQL 9.1 on Ubuntu 10.04 with Chef
# mycookbook/recipes/apt_postgresql_ppa.rb
#
# This recipe should add the sources for
# PostgreSQL 9.1 using the PPA available at:
# https://launchpad.net/~pitti/+archive/postgresql
apt_repository "postgresql" do
uri "http://ppa.launchpad.net/pitti/postgresql/ubuntu"
distribution node['lsb']['codename']
components ["main"]
@nzifnab
nzifnab / monkey_jammit.rb
Created May 7, 2011 08:38
Monkeypatch of Jammit to pre-compile using Haml
module Jammit
class Compressor
# Compiles a single JST file by writing out a javascript that adds
# template properties to a top-level template namespace object. Adds a
# JST-compilation function to the top of the package, unless you've
# specified your own preferred function, or turned it off.
# JST templates are named with the basename of their file.
# We are monkey-patching it so that we get Haml compilation *before* it hits the client.
def compile_jst(paths)