Some stuff that makes me happy:
- an honest try
- good decisions
- well written, persuasive prose
- elegant solutions
- evocative experiences
- genuine, honest communication
- practicing yoga
- afterglow
#!/bin/bash | |
# --- Version history --- | |
# 0.4: added variable to store file path, and $2 for base file name | |
# added variable to store desired reporting interval | |
# 0.3: added $1 to send in process ID at run time. | |
# 0.2: switched to $SECONDS for the loop. works. | |
# 0.1: didn't work well at all. | |
# --- Version history --- | |
# Usage: cputrack [PID] [filename] |
set :rails_env, :production | |
set :unicorn_binary, "/usr/bin/unicorn" | |
set :unicorn_config, "#{current_path}/config/unicorn.rb" | |
set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid" | |
namespace :deploy do | |
task :start, :roles => :app, :except => { :no_release => true } do | |
run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D" | |
end | |
task :stop, :roles => :app, :except => { :no_release => true } do |
Some stuff that makes me happy:
{ | |
"love": 11.666666666666666, | |
"music": 8.333333333333332, | |
"design": 8.333333333333332, | |
"social": 6.666666666666667, | |
"creator": 6.666666666666667, | |
"estate": 5, | |
"entrepreneur": 5, | |
"engineer": 5, | |
"web": 5, |
I build companies + products + high performing teams. I get results. Sometimes I advise startups.
# /config.ru | |
# This file is used by Rack-based servers to start the application. | |
# For Rails | |
require ::File.expand_path('../config/environment', __FILE__) | |
# For Sinatra | |
require './slim/slim.rb' | |
# - Make sinatra play nice | |
use Rack::MethodOverride |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
[jgalang@rashomon:~/Code/skunkworks/2fa] | |
∴ ruby totp_demo.rb | |
Time(sec) Time (UTC format) Value of T(Hex) TOTP Mode OK | |
------------------------------------------------------------------------------------------ | |
59 1970-01-01 00:00:59 0000000000000001 94287082 SHA1 ✔ | |
59 1970-01-01 00:00:59 0000000000000001 46119246 SHA256 ✔ | |
59 1970-01-01 00:00:59 0000000000000001 90693936 SHA512 ✔ | |
1111111109 2005-03-18 01:58:29 00000000023523EC 07081804 SHA1 ✔ | |
1111111109 2005-03-18 01:58:29 00000000023523EC 68084774 SHA256 ✔ |
# <%= hostname %> | |
# | |
# Serves a Rails app via SSL. If nginx finds a rule to handle the request, use | |
# it; unhandled requests are proxied upstream to a puma server. | |
# | |
# Notes: | |
# | |
# * Assumes SSL. Non-SSL requests are redirected to their SSL equivalents. | |
# * Assumes SSL certificate and key at ... | |
# * Assumes that rails app is served via puma at ... |