This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
# to install : | |
# $ curl -L "https://gist.github.com/gists/path/to/raw/gist/nokogiri.sh" | sh | |
set -e | |
echo "installing libraries" | |
brew install libxml2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Application Generator Template | |
# Modifies a Rails app to use Mongoid and OmniAuth | |
# Usage: rails new APP_NAME -m http://gist.github.com/path/to/this/raw/gist -T -O | |
# Information and a tutorial: | |
# http://github.com/RailsApps/rails3-mongoid-omniauth/ | |
# Generated using the rails_apps_composer gem: | |
# https://github.com/RailsApps/rails_apps_composer/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo tcpdump -s 1024 -l -i eth0 -n -A host $DOMAIN and port 80 -w $OUTPUT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
filename = case ARGV.size | |
when 0 then '.env' | |
when 1 then ARGV.first | |
else raise 'Too much arguments' | |
end | |
envs = File.read(filename).split("\n").join(" ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
my $device_id = $ARGV[0]; | |
`xinput list-props ${device_id}` =~ /Synaptics Off \((\d+)\).*(\d)/; | |
my $param_id = $1; | |
my $param_status = abs($2 - 1); | |
system("xinput", "set-prop", $device_id, $param_id, $param_status); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[11pt]{article} | |
\usepackage[margin=2.5cm]{geometry} | |
\usepackage[utf8x]{inputenc} | |
\usepackage{hyperref} | |
\usepackage{enumitem} | |
\setdescription{labelsep=\textwidth} | |
\usepackage{array, xcolor} | |
\definecolor{lightgray}{gray}{0.8} | |
\newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}} | |
\newcolumntype{R}{p{0.8\textwidth}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
touch "db/migrate/$(date +%m%d%Y%H%M%S)_create_user.rb" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) | |
func main() { | |
var wg sync.WaitGroup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION notify_changes() RETURNS trigger AS $notify_changes$ | |
DECLARE | |
CHANNEL TEXT; | |
ID TEXT; | |
JSON TEXT; | |
BEGIN | |
CHANNEL := 'changes'; | |
IF (TG_OP = 'DELETE') THEN | |
ID := OLD.id; | |
ELSE |