Skip to content

Instantly share code, notes, and snippets.


Dan Moore toobulkeh

View GitHub Profile

Keybase proof

I hereby claim:

  • I am toobulkeh on github.
  • I am toobulkeh ( on keybase.
  • I have a public key whose fingerprint is C6EC 159A 7438 069E 52CD 814A A493 24CA 42C7 C68C

To claim this, I am signing this object:

View 20170718-tesla-supercharger-data.json
This file has been truncated, but you can view the full file.
"address": "701 E Palm Canyon Dr\nPalm Springs, CA 92264",
"address_line_1": "701 E Palm Canyon Dr",
"address_line_2": "",
"address_notes": "",
"amenities": "",
"baidu_lat": "0.0000000000",
"baidu_lng": "0.0000000000",
toobulkeh / reversehash.js
Last active Jan 11, 2017
View reversehash.js
window.letters = "acdegilmnoprstuw";
function hash(s) {
var h = 7;
for(var i = 0; i < s.length; i++) {
h = h * 37 + letters.indexOf(s[i]);
return h;
View it-ebooks.rb
require 'nokogiri'
require 'open-uri'
MARK_FILE = "mark.dat"
def wait_for_threads(threads)
print "Waiting for downloads to finish..."
threads.each { |t| t.join }
puts " ok"
toobulkeh / nvlabs.html
Created Mar 2, 2014
EnvyLabs Hero Slider
View nvlabs.html
<div class="hero">
<img alt="Illustration Base" height="500" src="images/hero/base.png" width="1040">
<img alt="We Pursue Excellence" class="hero-slide active" height="500" src="images/hero/excellence.png" width="1040">
<img alt="We Practice Transparency" class="hero-slide" height="500" src="images/hero/transparency.png" width="1040">
<img alt="We Foster Education" class="hero-slide" height="500" src="images/hero/education.png" width="1040">
<img alt="We Create Fun" class="hero-slide prev" height="500" src="images/hero/fun.png" width="1040">
<a class="hero-prev" href="#">Prev</a>
<a class="hero-next" href="#">Next</a>
toobulkeh / processdiagram.js
Created Mar 2, 2014
BlackPixel's ProcessDiagram Gist
View processdiagram.js
processDiagram: function () {
if (e("#process-diagram").length > 0) {
e("a.num-block").click(function () {
e(this).parent().hasClass("out") ? e(this).parent().removeClass("out") : e(this).parent().hasClass("active") && setTimeout(function () {
}, 2e3)
animate: !1,
toobulkeh / deploy.rb
Created Jan 2, 2014 — forked from benedikt/rails.rb
Updated for Capistrano 3.
View deploy.rb
# encoding: UTF-8
# Place in config/deploy.rb
namespace :rails do
desc "Open the rails console on each of the remote servers"
task :console do
on roles(:app) do |host| #does it for each host, bad.
rails_env = fetch(:stage)
execute_interactively "ruby #{current_path}/script/rails console #{rails_env}"
toobulkeh /
Last active Dec 31, 2015
OSX Dev & Misc Tools
toobulkeh / performance_data.rb
Last active Oct 8, 2020
rbvmomi performance manager usage
View performance_data.rb
vim = RbVmomi::VIM.connect host: vcenter.hostname, user: vcenter.username, password: vcenter.password, insecure: true
pm = vim.serviceInstance.content.perfManager
# this is for a single cluster with hosts directly in one cluster. 'first' returns the cluster object.
hosts =
pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: ( - 6.hours)}).first[1][:metrics]['cpu.usagemhz']
# This above query queries for the 'cpu.usagemhz' counter, which by default matches the (none) rollup counter (NOT THE AVERAGE) in vSphere API.
# This is a problem with the RbVmomi gem helper function "retrieve_stats" only. To override this, use the following manual counter selection:
toobulkeh / development.pp
Last active Dec 10, 2015
Puppet Dependency Syntax
View development.pp
#Define Extra Stages of Install
#Note: "rvm-install" stage is defined in the "rvm" module
stage { 'req-install': before => Stage['rvm-install'] }
stage { 'rvm-install': before => Stage['ruby-install'] }
stage { 'ruby-install': before => Stage['rails-install'] }
stage { 'rails-install': before => Stage['main'] }
class install_reqs {
group { "puppet": ensure => "present", }
exec { "apt-update":