Skip to content

Instantly share code, notes, and snippets.

Avatar

Romain Champourlier rchampourlier

View GitHub Profile
@hdorio
hdorio / revprox.go
Created Jun 13, 2017
reverse proxy qui dump la reponse du service dans un fichier
View revprox.go
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/httputil"
_ "net/http/pprof"
@kylefox
kylefox / gist:4512777
Created Jan 11, 2013
If you want to use Xcode's FileMerge as your git mergetool, this is how you set it up.
View gist:4512777
# 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 Nov 24, 2021
ssl with pow using stud
View powssl

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 Feb 10, 2012
To install PostgresSQL 9.1 on Ubuntu 10.04 with Chef
View apt_postgresql_ppa.rb
# 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
Monkeypatch of Jammit to pre-compile using Haml
View monkey_jammit.rb
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)