Skip to content

Instantly share code, notes, and snippets.

View koko1000ban's full-sized avatar
🏠
Working from home

たびと koko1000ban

🏠
Working from home
View GitHub Profile
@deepak
deepak / .reerc
Created July 6, 2010 08:48
various REE gc settings
# 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
@mikhailov
mikhailov / ruby_gc.sh
Created March 11, 2011 10:33
Ruby’s GC Configuration
- 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
@HatemMahmoud
HatemMahmoud / Ubuntu rbenv
Created September 7, 2011 12:56
Installing Ruby 1.9.2 with OpenSSL on Ubuntu 11.04 using ruby-build and rbenv
# for more info: https://gist.github.com/1120938
@mkroman
mkroman / Network.cpp
Created November 17, 2011 01:42
Uncrustify configuration inspired by Google's C++ styleguide.
#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>
@hrldcpr
hrldcpr / tree.md
Last active June 8, 2024 18:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@repeatedly
repeatedly / downloader.d
Last active October 1, 2015 23:18
D言語でいかにしておっぱい画像をダウンロードするか〜2013
// 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
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/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
#
@dlutzy
dlutzy / gist:2469037
Created April 23, 2012 05:59
Multi VM Vagrantfile
# -*- 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}
]
@repeatedly
repeatedly / d_master.md
Last active July 16, 2024 17:07
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.

@mori-dev
mori-dev / gist:2905300
Created June 10, 2012 12:31
emacs23.4 にあって emacs24.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