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
task :ask_production_confirmation do | |
set(:confirmed) do | |
puts <<-WARN | |
======================================================================== | |
WARNING: You're about to perform actions on production server(s) | |
Please confirm that all your intentions are kind and friendly | |
======================================================================== |
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
# # your config.ru | |
# require 'unicorn_killer' | |
# use UnicornKiller::MaxRequests, 1000 | |
# use UnicornKiller::Oom, 400 * 1024 | |
module UnicornKiller | |
module Kill | |
def quit | |
sec = (Time.now - @process_start).to_i | |
warn "#{self.class} send SIGQUIT (pid: #{Process.pid})\talive: #{sec} sec" |
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
OK, Let's begin. Hello, Everybody. | |
My name is Narihiro Nakamura. | |
Today, I'm talking about "Parallel worlds of CRuby's GC". | |
I'm very happy now, because I'm meeting attendee in rubyconf. | |
And, one of my dreams is to talk in rubyconf. | |
So, I'm very happy and exciting. | |
Today is my first presentation in English. | |
My English is not good. |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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 | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
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
create trigger trades_readonly_trigger before insert or update or delete or truncate on trades for each statement execute procedure readonly_trigger_function(); |
name | glyph | mac | other | description |
---|---|---|---|---|
curly single quotes | ‘ ’ | Option+] and Shift+Option+] | ALT-0145 and ALT-0146 | hover for description |
curly double quotes | “ ” | Option+[ and Shift+Option+[ | ALT-0147 and ALT-0148 | - |
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
#!/usr/bin/env ruby | |
# findbreaks 0.9 | |
# Script to find all spec files in an `rspec` run that report errors and produce | |
# a list of all failed spec filenames, with each such listed once. Useful if you | |
# have numerous specs that break due to a world-changing edit you've just made, | |
# and you want a nice list of the broken specs without having to read through | |
# hundreds of lines of RSpec bleeding on your terminal. Pick one; fix it; run | |
# this again; repeat. | |
# |
OlderNewer