Skip to content

Instantly share code, notes, and snippets.

@lfender6445
lfender6445 / gist:6514498
Created September 10, 2013 19:40
stress test for leads
var start, elapsed;
var load_times= [];
var init = function(){
$('body').bind('finished', function(){
elapsed = new Date() - start;
load_times.push(elapsed);
console.log("Elapsed time: " + elapsed);
});
benchmark();
@lfender6445
lfender6445 / gist:7649335
Last active December 29, 2015 09:19
jasmine require js trickery
subject = {}
describe 'Main', ->
beforeAll = false
beforeEach ->
return if (beforeAll)
beforeAll = true;
require ['shared/main'], (main) -> subject = main
# AG profile srp /apartments/Georgia/Atlanta
retained memory by gem
-----------------------------------
910832 drawbridge-0.5.0
745144 tilt-2.0.1
430393 ../app
306934 temple-0.7.6
146312 virtus-1.0.5
137565 ag/app
@lfender6445
lfender6445 / usa_gov_redirects_to_weightloss_page.sh
Last active March 16, 2016 12:57
usa.gov redirects to weightloss page
› curl -I 'http://1.usa.gov/1WpPxtr'
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Wed, 16 Mar 2016 12:51:12 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 222
Connection: keep-alive
Cache-Control: private, max-age=90
Location: http://www.vacanteen.va.gov/exit.php?VAURL=http://zjvycjxu.beboletj.tegutonal.jxucjxine.strikenx.bid/site/page/?12144jzopusuh83342seqjq
@lfender6445
lfender6445 / redis-graphite
Last active May 4, 2016 17:15 — forked from somebox/redis-graphite.sh
graphite-redis : monitor redis statistics with graphite across several hosts
#!/usr/bin/env ruby
require 'socket'
# graphite/carbon settings
GRAPHITE_HOST="graphite.intra.local.ch"
GRAPHITE_PORT=8125
def instrument_redis(redis_host)
namespace = "#{redis_host}"
redis = {}
@lfender6445
lfender6445 / gist:fa3f78f2f312fbba3bf1
Last active December 18, 2016 16:43
Disable Mac Built In Camera (i-Sight) - shell script
#! /bin/bash
# ------ Description ------
# Shell script to enable and disable iSight macs built in camera
# Open terminal, follow instructions below
# ------ Installation ------
# cd ~/Downloads && curl -0 https://gist.githubusercontent.com/lfender6445/fa3f78f2f312fbba3bf1/raw/805e30f3e40d0f3211823ccde5e5bf085aad022a/gistfile1.sh -o mac_camera.sh && chmod +x mac_camera.sh
# ------ Usage -------------
# ./mac_camera.sh
osascript <<EOF

running spacemacs in vim-mode

S is SPACE, C is CTRL

  • S h d f (help define function)
  • S h d v (help define variable)

fuzzy file search

  • SPC p f (project finder) (type your filename)
    • C-c o
@lfender6445
lfender6445 / query_to_hash.js
Created September 25, 2013 23:55
jQuery convert query string to json
query_to_hash = function() {
var j, q;
q = window.location.search.replace(/\?/, "").split("&");
j = {};
$.each(q, function(i, arr) {
arr = arr.split('=');
return j[arr[0]] = arr[1];
});
return j;
}
body {
background-color: #262626 !important;
}
body > center > table, input, textarea {
background-color: #222 !important;
}
body > center > table > tbody > tr:first-child > td {
background-color: #ff6600 !important;
@lfender6445
lfender6445 / gist:70b00c97df43827279f7
Last active September 12, 2018 07:50
Never go idle in hipchat - Disable hipchat idle when away from computer
#! /bin/bash
# This if for the mac hipchat client
# To setup, download this file to any folder and save as `hip.sh`
# change the permissions of the file so it is executable using terminal
# You can do this by running `chmod u+x ./hip.sh`
# Now you can run `./hip.sh`
echo 'Hipchat hooray...ho... - Press CTRL+C to stop'
while :
do