Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Dan Moore toobulkeh

🎯
Focusing
Block or report user

Report or block toobulkeh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

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:

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
toobulkeh / reversehash.js
Last active Jan 11, 2017
trelloreversehash
View reversehash.js
//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;
View it-ebooks.rb
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 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>
</div>
@toobulkeh
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("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 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
toobulkeh / devtools.md
Last active Dec 31, 2015
OSX Dev & Misc Tools
View devtools.md
@toobulkeh
toobulkeh / performance_data.rb
Last active Aug 17, 2017
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 = 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 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":
You can’t perform that action at this time.