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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |
.axis path, | |
.axis line { |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<head> | |
<style> | |
path { | |
fill: none; | |
} | |
.axis { |
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
#! /bin/sh | |
# /etc/init.d/blah | |
# | |
# Some things that run always | |
touch /var/lock/blah | |
# Carry out specific functions when asked to by the system | |
case "$1" in | |
start) |
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
# place in lib/tasks/ | |
namespace :sidekiq do | |
desc "Strano | Stop sidekiq" | |
task :stop do | |
system "bundle exec sidekiqctl stop #{pidfile}" | |
end | |
desc "Strano | Start sidekiq" | |
task :start 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
[Unit] | |
Description=Delayed Job - Database based asynchronous priority queue system | |
[Service] | |
Type=forking | |
PIDFile=/home/<%= fetch(:user) %>/<%= fetch(:application) %>/current/tmp/pids/delayed_job.pid | |
ExecStartPre=/bin/rm -f /home/<%= fetch(:user) %>/<%= fetch(:application) %>/current/tmp/pids/delayed_job.pid | |
ExecStart=/etc/init.d/delayed_job start | |
Restart=always |
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
#!/usr/bin/env bash | |
APP_DIR=<%= current_path %> | |
CURRENT_DIR="cd $APP_DIR" | |
STAGE=<%= fetch(:stage) %> | |
DJ_PID="$APP_DIR/tmp/pids/delayed_job.pid" | |
check_pid(){ | |
if [ -f $DJ_PID ]; then | |
PID=`cat $DJ_PID` |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
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
[ | |
{"apples": 53245, "oranges": 200}, | |
{"apples": 28479, "oranges": 200}, | |
{"apples": 19697, "oranges": 200}, | |
{"apples": 24037, "oranges": 200}, | |
{"apples": 40245, "oranges": 200} | |
] |
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
$ vagrant up | |
Bringing machine 'management' up with 'virtualbox' provider... | |
Bringing machine 'lb' up with 'virtualbox' provider... | |
Bringing machine 'web1' up with 'virtualbox' provider... | |
Bringing machine 'web2' up with 'virtualbox' provider... | |
==> management: Importing base box 'ubuntu/trusty64'... | |
==> management: Matching MAC address for NAT networking... | |
==> management: Checking if box 'ubuntu/trusty64' is up to date... | |
==> management: A newer version of the box 'ubuntu/trusty64' is available! You currently | |
==> management: have version '20150521.0.0'. The latest is version '20150609.0.10'. Run |