Skip to content

Instantly share code, notes, and snippets.

/tmp/compare/svn$ svn commit -m 'commit me'
Sending what.txt
Transmitting file data .
Committed revision 13.
/tmp/compare/svn$ svn info
Path: .
URL: http://localhost:5203/svn
Repository Root: http://localhost:5203/svn
Repository UUID: 3b9a9e50-8ead-4325-b308-a6ad9b1ac2aa
static void init_http_user_name()
{
error("1");
struct strbuf name = STRBUF_INIT;
error("2");
fprintf(stdout, "Username: ");
error("3");
fflush(stdout);
error("4");
strbuf_getline(&name, stdin, '\n');
{:en=>
{:hello=>"Hello world",
:support=>{:array=>{:skip_last_comma=>false, :sentence_connector=>"and"}},
:activerecord=>
{:errors=>
{:models=>nil,
:messages=>
{:accepted=>"must be accepted",
:less_than=>"must be less than {{count}}",
:inclusion=>"is not included in the list",

Git Automatic Mirroring

Git automatic mirroring is a system for making Git repositories distribute automatically. It is the first stage of more general P2P features planned.

Client-side Mirroring

With this feature, the git client can be configured to fetch from a (more local, faster, more lightly loaded) URL first. It checks with the real server at the end of the fetch to verify and/or complete the fetch.

Chances of a SHA-1 collision in a 1 million object database:
p = (1000000(1000000-1)/2) * (1/2^160)
1/2923006197668003504410874076306642345
1 in 2,923,006,197,668,003,504,410,874,076,306,642,345
Chances of having 6 specific hard drives fail within one hour:
3% annual failure rate = 1/33 per year for one hard drive
1/12167 per day for one hard drive
1/292001 per hour for one hard drive
1/619877727940661135383038961752001 for 6 hard drives in one hour
first rackspace gist
-module(list_utils).
-export([split_list/2]).
split_list(List, Splits) ->
case Splits > 1 of
true -> Each = round(length(List) / Splits),
list_range([], List, Each);
false -> List
end.
>> {:type => ['value1', 'value2']}.to_json
=> "{\"type\":[\"value1\",\"value2\"]}"
>> {:type => ['value1', 'value2']}.to_yaml
=> "--- \n:type: \n- value1\n- value2\n"
>> {:type => ['value1', 'value2']}.to_xml
RuntimeError: Not all elements respond to to_xml
@schacon
schacon / gist:171255
Created August 20, 2009 18:39
my .gitconfig file
[user]
name = Scott Chacon
email = schacon@gmail.com
[alias]
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
unstage = reset HEAD
lol = log --pretty=oneline --abbrev-commit --graph --decorate
branches = !git-branches
st = status
[gui]
ERROR - Internal error processing batch_insert
java.lang.NoSuchMethodError: org.apache.cassandra.db.ColumnFamily.serializer()Lorg/apache/cassandra/io/ICompactSerializer;
at org.apache.cassandra.db.RowMutationSerializer.freezeTheMaps(RowMutation.java:310)
at org.apache.cassandra.db.RowMutationSerializer.serialize(RowMutation.java:322)
at org.apache.cassandra.db.RowMutationSerializer.serialize(RowMutation.java:295)
at org.apache.cassandra.db.RowMutation.makeRowMutationMessage(RowMutation.java:242)
at org.apache.cassandra.db.RowMutation.makeRowMutationMessage(RowMutation.java:235)
at org.apache.cassandra.service.StorageProxy.insertBlocking(StorageProxy.java:159)
at org.apache.cassandra.service.CassandraServer.doInsert(CassandraServer.java:314)
at org.apache.cassandra.service.CassandraServer.batch_insert(CassandraServer.java:294)