Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
# source: http://github.com/rtomayko/dotfiles/blob/rtomayko/.reerc | |
# baseline REE environment settings for server environments | |
# http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning | |
## ruby defaults | |
# RUBY_HEAP_MIN_SLOTS=10000 | |
# RUBY_HEAP_SLOTS_INCREMENT=10000 | |
# RUBY_HEAP_SLOTS_GROWTH_FACTOR=1.8 | |
# RUBY_GC_MALLOC_LIMIT=8000000 |
- http://www.coffeepowered.net/2009/06/13/fine-tuning-your-garbage-collector/ | |
- http://snaprails.tumblr.com/post/241746095/rubys-gc-configuration | |
article’s settings: ("spec spec" took 17-23!sec) | |
export RUBY_HEAP_MIN_SLOTS=1250000 | |
export RUBY_HEAP_SLOTS_INCREMENT=100000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_GC_MALLOC_LIMIT=30000000 | |
export RUBY_HEAP_FREE_MIN=12500 |
# for more info: https://gist.github.com/1120938 |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <netdb.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <iostream> | |
#include <stdarg.h> | |
#include <stdio.h> |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
// Written in the D programming language. | |
/** | |
* High peformance downloader | |
* | |
* Implemented according to <a href="http://yusukebe.com/archives/20120229/072808.html">this implementation</a>. | |
* | |
* Example: | |
* ----- | |
* dmd -L-lcurl -run downloader.d |
#!/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 | |
# |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# David Lutz's Multi VM Vagrantfile | |
# inspired from Mark Barger's https://gist.github.com/2404910 | |
boxes = [ | |
{ :name => :web, :role => 'web_dev', :ip => '192.168.33.1', :ssh_port => 2201, :http_fwd => 9980, :cpus =>4, :shares => true }, | |
{ :name => :data, :role => 'data_dev', :ip => '192.168.33.2', :ssh_port => 2202, :mysql_fwd => 9936, :cpus =>4 }, | |
{ :name => :railsapp, :role => 'railsapp_dev', :ip => '192.168.33.3', :ssh_port => 2203, :http_fwd => 9990, :cpus =>1} | |
] |
appt-delete | |
appt-make-list | |
browse-url-default-browser | |
browse-url-url-at-point | |
bw-adjust-window | |
bw-b | |
bw-balance-sub | |
bw-dir | |
bw-eqdir | |
bw-find-tree-sub |