Skip to content

Instantly share code, notes, and snippets.

@masaki
masaki / rubygems-1.8.5-no_proxy.patch
Created July 20, 2011 12:15
RubyGems NO_PROXY auto-detection without http_configuration gem
--- rubygems-1.8.5/lib/rubygems/remote_fetcher.rb.orig 2011-07-20 00:28:13.000000000 +0900
+++ rubygems-1.8.5/lib/rubygems/remote_fetcher.rb 2011-07-20 01:09:59.000000000 +0900
@@ -69,6 +69,7 @@
when URI::HTTP then proxy
else URI.parse(proxy)
end
+ @no_proxy = (ENV['NO_PROXY'] || ENV['no_proxy'] || 'localhost, 127.0.0.1').split(/\s*,\s*/)
@user_agent = user_agent
end
repo for a more modern version of qt (4.7)
http://atrpms.net/documentation/install/
http://packages.atrpms.net/dist/el5/qt4/
cat /etc/yum.repos.d/atrpms.repo
[atrpms]
name=ATrpms manual
baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/testing/
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
@miyagawa
miyagawa / gist:965935
Created May 11, 2011 04:59
hijack any LWP stack with your PSGI app - it's on CPAN now http://search.cpan.org/~miyagawa/LWP-Protocol-PSGI-0.01/
use strict;
use LWP::UserAgent;
my $app = do {
use Mojolicious::Lite;
get '/' => sub { shift->render(text => "Hello World") };
get '/search' => sub {
my $self = shift;
my $foo = $self->param('q');
$self->render(text => "You searched $foo");
@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