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 perl | |
| use 5.014; | |
| use warnings; | |
| use Benchmark 'cmpthese'; | |
| use Digest::CRC (); | |
| use String::CRC32 (); | |
| my $payload = 'a' x 1024; |
| #!/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 | |
| # |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| # 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 |
| #!/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: |