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 easy_install webcolors Searching for webcolors | |
Reading http://cheeseshop.python.org/pypi/webcolors/ | |
Reading http://www.bitbucket.org/ubernostrum/webcolors/overview/ | |
error: Download error: (-2, 'Name or service not known') | |
exit 1 | |
$ sudo easy_install http://pypi.python.org/packages/source/w/webcolors/webcolors-1.3.1.tar.gz | |
Downloading http://pypi.python.org/packages/source/w/webcolors/webcolors-1.3.1.tar.gz | |
Processing webcolors-1.3.1.tar.gz | |
Running webcolors-1.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-HXFg3s/webcolors-1.3.1/egg-dist-tmp-hw4BbL |
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
# -*- encoding: utf-8 -*- | |
namespace :setup do | |
def copy_config(options = {}) | |
Dir["#{RAILS_ROOT}/**/*.sample", "#{RAILS_ROOT}/**/*.example"].each do |source| | |
target = source.sub(/\.(ex|s)ample$/, '') | |
if options[:force] or not File.exist?(target) | |
require 'fileutils' | |
puts "Create config file '#{target}' from '#{source}'" | |
FileUtils.copy_file source, target |
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
--- 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 | |
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
--- testman4trac/trunk/testmanager/api.py.orig 2011-06-18 23:16:34.000000000 +0900 | |
+++ testman4trac/trunk/testmanager/api.py 2011-06-23 18:55:13.000000000 +0900 | |
@@ -85,8 +85,10 @@ | |
if row[0] == 'default': | |
self.default_outcome = row[1].lower() | |
else: | |
- color = row[0].partition('.')[0] | |
- outcome = row[0].partition('.')[2].lower() | |
+ color = row[0].split('.')[0] | |
+ outcome = '' |
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
# -*- coding: utf-8 -*- | |
# file: trac-install.sh | |
# prepare | |
yum install sqlite sqlite-devel mod_wsgi | |
easy_install pysqlite Babel Genshi pytz docutils | |
# or `yum install python-sqlite2 babel python-genshi pytz python-docutils` | |
# setup | |
wget http://www.i-act.co.jp/project/products/downloads/Trac-0.12.2.ja1.zip |
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
diff --git a/tracrpc/ticket.py b/tracrpc/ticket.py | |
index 6224276..3042718 100644 | |
--- a/tracrpc/ticket.py | |
+++ b/tracrpc/ticket.py | |
@@ -237,14 +237,13 @@ class TicketRPC(Component): | |
req.args['comment'] = comment | |
req.args['ts'] = time_changed | |
changes, problems = tm.get_ticket_changes(req, t, action) | |
- for warning in problems: | |
- add_warning(req, "Rpc ticket.update: %s" % warning) |
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
namespace win32 { | |
// deleter traits | |
template <class T> struct handle_deleter_t { | |
typedef T handle_type; | |
}; | |
struct win32_handle_deleter : public handle_deleter_t<HANDLE> { | |
void operator()(handle_type handle) { | |
if (handle && handle != INVALID_HANDLE_VALUE) ::CloseHandle(handle); | |
}; | |
}; |
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
$ git clone http://git.chromium.org/git/chromium.git chromium-src | |
Cloning into chromium-src... | |
remote: Counting objects: 599632, done. | |
remote: Compressing objects: 100% (125184/125184), done. | |
remote: Total 599632 (delta 446304), reused 587790 (delta 435692) | |
Receiving objects: 100% (599632/599632), 1.05 GiB | 311 KiB/s, done. | |
Resolving deltas: 100% (446304/446304), done. |
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
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
typedef std::vector<char> Buffer; | |
void assign(std::stringstream& stream) { | |
Buffer buffer; | |
buffer.push_back('M'); | |
buffer.push_back('A'); |
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/ruby | |
require 'stringio' | |
module AB | |
class Response | |
class << self | |
def parse_string(string) | |
new.tap {|res| res.parse_string(string) } | |
end |