Skip to content

Instantly share code, notes, and snippets.

View huned's full-sized avatar
💭
I may be slow to respond.

Huned Botee huned

💭
I may be slow to respond.
View GitHub Profile
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@vvalgis
vvalgis / Capistrano tasks for starting unicorn.rb
Created May 7, 2010 08:13
Capistrano tasks for starting unicorn
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
#!/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]
@jurisgalang
jurisgalang / totp
Last active November 17, 2017 00:46
Ruby implementation of the Time-Based One-Time Password (TOTP) Algorithm described at http://tools.ietf.org/html/rfc6238
[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 ✔
@thomasyip
thomasyip / config.ru
Created October 26, 2011 05:46
Config.ru for Rails meets Sinatra
# /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
@michaelfairley
michaelfairley / README.md
Created November 24, 2012 18:01
jruby-go

jruby-go

Go's concurrency model on top of JRuby

Channels

Channel.new creates a channel, and you can optionally pass it a capacity: Channel.new(200)

Use << to send on a channel: chan << "stuff"

@huned
huned / l101knkKwk.md
Created August 3, 2011 22:33
String#to_markdown

Huned Botee

datanerd + company/team builder

I build companies + products + high performing teams. I get results. Sometimes I advise startups.

Experience

  • Company Builder at Huned Botee (Internet)
  • VP Engineering at Crowdcast (Computer Software)
  • Senior Software Engineer at Swivel (Internet)
  • Project Manager at KickApps (Internet)
@huned
huned / gist:1094999
Created July 20, 2011 13:57
Word frequency (% of tweets in the past week) used by my twitter followers. It's a rough indication of what my twitter followers prattle on about.
{
"love": 11.666666666666666,
"music": 8.333333333333332,
"design": 8.333333333333332,
"social": 6.666666666666667,
"creator": 6.666666666666667,
"estate": 5,
"entrepreneur": 5,
"engineer": 5,
"web": 5,
@huned
huned / happy.md
Last active September 23, 2015 18:38

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
@huned
huned / random
Last active August 29, 2015 14:15
#!/bin/sh
# Generate n random numbers in [0, 999]. n defaults to 100 but override it with $1.
if [ "$1" == '' ]; then
upto=100
else
upto=$1
fi
for i in `seq 1 $upto`; do echo $(($RANDOM % 1000)); done