Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the branch/status of the current git repository | |
# * the branch of the current subversion repository | |
# * the return value of the previous command | |
# | |
# USAGE: |
# My (almost) perfect perl tidy config file | |
-l=100 # Max line width is 100 cols - We are not on vt100 line terminals anymore | |
-i=2 # Indent level is 2 cols | |
-ci=2 # Continuation indent is 2 cols | |
-se # Errors to STDERR | |
-vt=2 # Maximal vertical tightness | |
-cti=0 # No extra indentation for closing brackets | |
-pt=2 # High parenthesis tightness | |
-bt=2 # High brace tightness |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#!/usr/bin/env perl | |
use 5.014; | |
use warnings; | |
use Benchmark 'cmpthese'; | |
use Digest::CRC (); | |
use String::CRC32 (); | |
my $payload = 'a' x 1024; |
#!/usr/bin/env sh | |
# Download lists, unpack and filter, write to stdout | |
curl -s https://www.iblocklist.com/lists.php \ | |
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| xargs wget -O - \ | |
| gunzip \ | |
| egrep -v '^#' |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
#!/usr/bin/env perl | |
# | |
# Filesystem changes trigger | |
use v5.14; | |
use FindBin; | |
use lib "$FindBin::Bin/../lib"; | |
use E1::Setup::Perl; | |
use Filesys::Notify::Simple; |