This file contains 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
wget https://github.com/downloads/libevent/libevent/libevent-2.0.18-stable.tar.gz | |
tar zxf libevent-2.0.18-stable.tar.gz | |
cd libevent-2.0.18-stable | |
sudo ./configure | |
sudo ./make | |
DIR="/home/ec2-user/downloads/libevent-2.0.18-stable" | |
wget http://downloads.sourceforge.net/tmux/tmux-1.9.tar.gz | |
tar zxf tmux-1.9.tar.gz | |
cd tmux-1.9 |
This file contains 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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
This file contains 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
# bash completion for rake | |
# | |
# some code from on Jonathan Palardy's http://technotales.wordpress.com/2009/09/18/rake-completion-cache/ | |
# and http://pastie.org/217324 found http://ragonrails.com/post/38905212/rake-bash-completion-ftw | |
# | |
# For details and discussion | |
# http://turadg.aleahmad.net/2011/02/bash-completion-for-rake-tasks/ | |
# | |
# INSTALL | |
# |
This file contains 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 | |
# Complete rake tasks script for bash | |
# Save it somewhere and then add | |
# complete -C path/to/script -o default rake | |
# to your ~/.bashrc | |
# Xavier Shay (http://rhnh.net), combining work from | |
# Francis Hwang ( http://fhwang.net/ ) - http://fhwang.net/rb/rake-complete.rb | |
# Nicholas Seckar <nseckar@gmail.com> - http://www.webtypes.com/2006/03/31/rake-completion-script-that-handles-namespaces | |
# Saimon Moore <saimon@webtypes.com> |
This file contains 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
#user nobody; | |
worker_processes 1; | |
error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
This file contains 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
<?php | |
/* | |
By Marco Arment <me@marco.org>. | |
This code is released in the public domain. | |
THERE IS ABSOLUTELY NO WARRANTY. | |
Usage example: | |
// In a registration or password-change form: |
This file contains 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 | |
#cloneall.sh by Jan-Piet Mens, February 2012 | |
# Obtain a list of gists (mine) and clone them into the current directory | |
# Requires jsonpipe (https://github.com/dvxhouse/jsonpipe) | |
URL=http://gist.github.com/api/v1/json/gists/jpmens | |
CLONEURLFMT="git://gist.github.com/%d.git\n" | |
curl -qs $URL | | |
jsonpipe -s ' ' | |
This file contains 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 | |
use v5.10; | |
use strict; | |
use warnings; | |
# Usage: gist_backup.pl <user> | |
# Clone all the gists of a GitHub user |
This file contains 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
require 'rubygems' | |
require 'net/http' | |
require 'uri' | |
BIT_RATE = 48 #6kbxseg * 60 seg (a min) * 15min | |
TAMO_CORTE = (BIT_RATE/8) * 60 * 15 #en KB | |
url = URI.parse('http://186.1.15.253:8000/') | |
Net::HTTP.start(url.host, url.port) do |http| |
This file contains 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/bash | |
# | |
# Report time to first byte for the provided URL using a cache buster to ensure | |
# that we're measuring full cold-cache performance | |
while (($#)); do | |
echo $1 | |
curl -so /dev/null -H "Pragma: no-cache" -H "Cache-Control: no-cache" \ | |
-w "%{http_code}\tPre-Transfer: %{time_pretransfer}\tStart Transfer: %{time_starttransfer}\tTotal: %{time_total}\tSize: %{size_download}\n" \ | |
"$1?`date +%s`" |
OlderNewer