Skip to content

Instantly share code, notes, and snippets.

@rdegges
rdegges / proxy_nginx.sh
Created April 11, 2011 05:30
Create a HTTP proxy for jenkins using NGINX.
sudo aptitude -y install nginx
cd /etc/nginx/sites-available
sudo rm default
sudo cat > jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
@bobpp
bobpp / com.github.mxcl.homebrew.daemontools.plist
Created February 13, 2011 06:47
daemontools at Mac OS X homebrew
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.mxcl.homebrew.daemontools</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/svscanboot</string>
</array>
@walf443
walf443 / gist:730884
Created December 6, 2010 20:21
auto-spork-make.pl
use strict;
use warnings;
use Filesys::Notify::Simple;
use Spork;
use lib 'lib';
while ( 1 ) {
my $watcher = Filesys::Notify::Simple->new(['.']);
$watcher->wait(sub {});
Spork->new->load_hub->command->process('-make', @ARGV);
@gintenlabo
gintenlabo / algorithm.hpp
Created November 5, 2010 16:43
C++0x から <algorithm> に追加される関数の C++03 による実装
//
// C++0x から <algorithm> に追加される関数を C++03 で使えるよう実装したヘッダ
// やっつけテストも記述しました。
//
#ifndef ETUDE_INCLUDED_ALGORITHM_HPP_
#define ETUDE_INCLUDED_ALGORITHM_HPP_
#include <algorithm>
#include <iterator>
#include <utility>
@masaki
masaki / rubygems-remote_fetcher-no_proxy.patch
Created July 28, 2009 10:29
RubyGems with HTTP_PROXY/NO_PROXY
--- rubygems/remote_fetcher.rb.orig 2009-07-28 19:01:30.000000000 +0900
+++ rubygems/remote_fetcher.rb 2009-07-28 19:05:47.000000000 +0900
@@ -4,6 +4,7 @@
require 'uri'
require 'rubygems'
+require 'http_configuration'
##
# RemoteFetcher handles the details of fetching gems and gem information from
@masaki
masaki / python-urllib-noproxy.patch
Created May 21, 2009 12:31
yum enable NO_PROXY (proxy=_none_)
diff --git a/urllib.py b/urllib.py
index 802d9b7..d13ddb7 100644
--- a/urllib.py
+++ b/urllib.py
@@ -35,7 +35,7 @@ __all__ = ["urlopen", "URLopener", "FancyURLopener", "urlretrieve",
"localhost", "thishost", "ftperrors", "basejoin", "unwrap",
"splittype", "splithost", "splituser", "splitpasswd", "splitport",
"splitnport", "splitquery", "splitattr", "splitvalue",
- "splitgophertype", "getproxies"]
+ "splitgophertype", "getproxies", "getnoproxies"]