This file contains hidden or 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://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-1.gz | |
http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-2.gz | |
http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-0.gz | |
http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-3.gz | |
http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-4.gz | |
http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-5.gz | |
http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-6.gz | |
http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-7.gz | |
http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-8.gz | |
http://storage.googleapis.com/books/ngrams/books/googlebooks-eng-all-1gram-20120701-9.gz |
This file contains hidden or 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
class ABC | |
include Interactor | |
def self.inherited(klass) | |
klass.class_eval do | |
before do | |
p "doing it" | |
end | |
after do |
This file contains hidden or 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
# from http://www.onurguzel.com/supervisord-restarting-and-reloading/ | |
Posted byOnur Güzel 7 September 2012 22 Comments on Supervisord: Restarting and Reloading | |
Supervisord is a great daemon for managing application processes. However it does not have a reload option, and restart works different than we get used to. These command makes the following effects. | |
service supervisor restart | |
Restart supervisor service without making configuration changes available. It stops, and re-starts all managed applications. | |
supervisorctl restart <name> | |
Restart application without making configuration changes available. It stops, and re-starts the application. |
This file contains hidden or 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
# Project: https://github.com/getsentry/sentry | |
# Doc: https://docs.getsentry.com/on-premise/server/installation/python/ | |
sudo apt-get update | |
sudo apt-get install python-virtualenv | |
sudo apt-get install python-setuptools | |
sudo apt-get install python-pip | |
sudo apt-get install libxslt1-dev | |
sudo apt-get install gcc |
This file contains hidden or 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
# Project: https://github.com/getsentry/sentry | |
# Doc: https://docs.getsentry.com/on-premise/server/installation/python/ | |
sudo apt-get update | |
sudo apt-get install python-virtualenv | |
sudo apt-get install python-setuptools | |
sudo apt-get install python-pip | |
sudo apt-get install libxslt1-dev | |
sudo apt-get install gcc |
This file contains hidden or 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
require 'rspec/expectations' | |
RSpec::Matchers.define :be_boolean do | |
match do |actual| | |
[true, false].include? actual | |
end | |
failure_message_for_should do |actual| | |
"expected that #{actual.inspect} would be a boolean(true or false)" | |
end |
This file contains hidden or 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
function round(bool) { | |
let answer = false; | |
if (Math.random() > 0.3) answer = true; | |
if (bool == answer) return 1; | |
return -1; | |
} | |
let result; | |
result = 0; |
This file contains hidden or 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
{ | |
"config": { | |
"chainId": 33, | |
"homesteadBlock": 0, | |
"eip155Block": 0, | |
"eip158Block": 0 | |
}, | |
"nonce": "0x0000000000000033", | |
"timestamp": "0x0", | |
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", |
This file contains hidden or 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 | |
-------------------------- | |
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 hidden or 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
require 'json' | |
class Hash | |
def try(*a, &b) | |
if a.empty? && block_given? | |
yield self | |
else | |
__send__(*a, &b) | |
end | |
end |
NewerOlder