Skip to content

Instantly share code, notes, and snippets.

View toobulkeh's full-sized avatar
🎯
Focusing

Dan Moore toobulkeh

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am toobulkeh on github.
  • I am toobulkeh (https://keybase.io/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:

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",
"chargers": "<p><strong>Charging</strong><br />2 Tesla Connectors, up to 13kW.<br />Available for patrons only. Please see valet.</p>",
@toobulkeh
toobulkeh / reversehash.js
Last active January 11, 2017 18:56
trelloreversehash
//https://trello.com/jobs/details?gh_jid=480058
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;
require 'nokogiri'
require 'open-uri'
MARK_FILE = "mark.dat"
MAX_THREADS = 5
def wait_for_threads(threads)
print "Waiting for downloads to finish..."
threads.each { |t| t.join }
puts " ok"
@toobulkeh
toobulkeh / nvlabs.html
Created March 2, 2014 01:06
EnvyLabs Hero Slider
<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>
</div>
@toobulkeh
toobulkeh / processdiagram.js
Created March 2, 2014 01:01
BlackPixel's ProcessDiagram Gist
processDiagram: function () {
if (e("#process-diagram").length > 0) {
e("a.num-block").click(function () {
e("ul.diagram.process").toggleClass("active");
e(this).parent().hasClass("out") ? e(this).parent().removeClass("out") : e(this).parent().hasClass("active") && setTimeout(function () {
e(this).parent().addClass("out")
}, 2e3)
});
e("#process-diagram").easytabs({
animate: !1,
@toobulkeh
toobulkeh / deploy.rb
Created January 2, 2014 02:42 — forked from benedikt/rails.rb
Updated for Capistrano 3.
# 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
toobulkeh / devtools.md
Last active December 31, 2015 18:59
OSX Dev & Misc Tools
@toobulkeh
toobulkeh / performance_data.rb
Last active January 3, 2024 09:08
rbvmomi performance manager usage
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 = vim.serviceInstance.find_datacenter.hostFolder.children.first.host
pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: (Time.now - 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
toobulkeh / development.pp
Last active December 10, 2015 14:08
Puppet Dependency Syntax
#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":