- 2010 InnoDB 5.1 announced, will first ship with MySQL 5.5.
- Historically InnoDB development lags while MySQL is trying to GA
- lots of things fixed in InnoDB since MySQL 5.0
- important note -- plugin version of InnoDB is not the default in 5.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For context, this was inspired by the RubyRogues podcast #79 where they talked about | |
# documentation in Ruby, and specifically grumbled quite a bit about the failings of RDoc. | |
# | |
# http://rubyrogues.com/079-rr-documenting-code/ | |
# | |
# As someone who's spent a lot of time using an IDE for programming C# and Java, I think | |
# Ruby could do a lot better at putting documentation at our fingertips as we program. | |
# | |
# Maybe making the documentation part of the structure of the code would facilitate this? | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ip route |grep default # default via 10.235.9.1 dev eth0 | |
ip route change default via `ip route| awk '/^def/{print $3}'` dev eth0 initcwnd 16 | |
ip route |grep default # default via 10.235.9.1 dev eth0 initcwnd 16 | |
sysctl -w net.ipv4.tcp_slow_start_after_idle=0 | |
sysctl -a |grep net.ipv4.tcp_slow_start_after_idle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change the path to match the path to your machine. | |
$mrb_path = File.expand_path("~/src/mruby") | |
$mrbc = File.join($mrb_path,"/bin/mrbc") | |
task :default do | |
# dumps the Ruby file to disk | |
File.open("mandelbrot.rb", "w"){|f| f << mandelbrot_ruby_code } | |
# creates the .c file containing mandelbrot char array for the bytecode | |
`#{$mrbc} -Bmandelbrot_bytecode ./mandelbrot.rb` | |
example_file = wrapper_code(File.read("./mandelbrot.c")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status | |
s = status | |
co = checkout | |
c = commit -v | |
ci = commit -a -v | |
b = branch | |
d = diff | |
p = pull | |
a = add -A . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream app { | |
server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name www.app.com; | |
rewrite ^/(.*) http://app.com/$1 permanent; | |
} | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webserver: webserver.c libuv/uv.a http-parser/http_parser.o | |
gcc -I libuv/include \ | |
-lrt -lm -lpthread -o \ | |
webserver webserver.c \ | |
libuv/uv.a http-parser/http_parser.o | |
libuv/uv.a: | |
$(MAKE) -C libuv | |
http-parser/http_parser.o: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 |
NewerOlder