Skip to content

Instantly share code, notes, and snippets.

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@bradoaks
bradoaks / hfsc-shape.sh
Created April 25, 2011 14:51 — forked from eqhmcow/hfsc-shape.sh
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.
@bradoaks
bradoaks / puppet NFS
Created December 25, 2010 04:18 — forked from eqhmcow/puppet NFS
# modules/nfs/manifests/init.pp
class nfs_server {
file { "destroy_exports":
path => "/etc/exports.puppet",
ensure => present,
source => "puppet://$servername/modules/nfs/empty",
}
package { "portmap":
2010 ENGLISH GEEKY ADVENT CALENDARS:
http://advent.rjbs.manxome.org/2010/
http://advent.perldancer.org/2010
http://www.catalystframework.org/calendar
http://perladvent.pm.org/2010/
http://sysadvent.blogspot.com/
http://perl-users.jp/articles/advent-calendar/2010/english/
http://perl6advent.wordpress.com/
# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md4 : active raid1 sda2[0] sdb2[1]
1220939904 blocks [2/2] [UU]
md3 : active raid10 sda1[0] sdb1[2] sdd[1] sdc[3]
1465146880 blocks 64K chunks 2 near-copies [4/4] [UUUU]
unused devices: <none>
# pvs
# dmsetup ls
raid1-virtualmachines (251, 1)
raid10-virtualmachines (251, 5)
raid10-swap (251, 4)
raid10-aptmirror (251, 3)
raid1-backup (251, 0)
raid1-lucid--root (251, 2)
# dmsetup info raid10-virtualmachines
Name: raid10-virtualmachines
State: ACTIVE
% Latex Resume Template
% Created by Ben Berry ([email protected])
% 2 Feb 2010
% Okay, notes...
% So this whole thing is a hack I put together while I was learning LaTeX, so I know it sucks.
% The doc's margins are set a few lines down from here, on that one that says \usepackage...{geometry}.
% Aside from that, I set \leftskip to be 4em, which is what makes almost all the text moved over.
% The \heading and \subheading items reduce the \leftskip by 4em and 2em, respectively.
% For those of you who paid attention in math class, this means \heading is "indented" 0em,
#!/usr/bin/perl
use Benchmark qw(:all);
my @strings = (123456, 1234567890, 1234567890123456);
foreach my $str (@strings) {
print "\nString of " . length($str) . " characters\n";
cmpthese(
1000000,
{
'length and substr' => sub {