Skip to content

Instantly share code, notes, and snippets.

View jakelodwick's full-sized avatar

Jake Lodwick jakelodwick

View GitHub Profile
#current way
curl -H "Content-Type: application/json" -d '{ "msg": "your_value_here" }' https://sender.blockspring.com/api/blocks/2a5d9f4c92ae2631f3f35db803f1c52b?api_key=Log-In-to-see-your-API-key
#possible alternative
curl -H "Content-Type: application/json" -d '{ "block_id": "2a5d9f4c92ae2631f3f35db803f1c52b", "msg": "your_value_here", "api_key": "Log-In-to-see-your-API-key" }' https://sender.blockspring.com/api/
@jakelodwick
jakelodwick / download.rb
Created June 22, 2014 22:25
line-broken file extension
`curl -O 'http://jakelodwick.imgix.net/bball.jpg\n'`
@jakelodwick
jakelodwick / keezyColors.js
Created May 21, 2014 16:43
Keezy colors array
var colors = ['FC4A39', 'F7CD6C', '79F7B9', 'AFC870', 'FD9A3F', 'FC5879', 'BA63BD', '5CF196'];
# This script assumes a dump of images from the Everyday iOS app.
# It distributes all images from images/ into N subdirectories,
# starting with 1 and proceeding to N.
# the intention is to load these images into a video editor
# to make a variant of Kalina's videos that shows multiple
# images at once.
require 'FileUtils'
print "Looking for images in folder 'images'... "
@jakelodwick
jakelodwick / gist:8378421
Created January 11, 2014 23:35
Nice quotes in CSS, within a <q> tag
q:before { content: '\201C' }
q:after { content: '\201D'; }
@jakelodwick
jakelodwick / inject-jquery.js
Last active January 20, 2016 17:49
Inject jQuery into any webpage through the console
// paste this into your browser's console and jQuery will be loaded
var jq = document.createElement('script');
jq.type = 'text/javascript';
jq.src = '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js';
document.head.appendChild(jq);
@jakelodwick
jakelodwick / outlines.css
Created January 17, 2013 04:12
CSS snippet that puts colored outlines (NOT borders) around all elements on page. I did not create this, but I forget where I got it.
* { outline: 1px dotted red } * * { outline: 1px dotted green } * * * { outline: 1px dotted orange } * * * * { outline: 1px dotted blue } * * * * * { outline: 1px solid fuchsia } * * * * * * { outline: 1px solid teal } * * * * * * * { outline: 1px solid indigo } * * * * * * * * { outline: 1px solid brown }
@jakelodwick
jakelodwick / current-local-ip
Created January 7, 2013 18:28
Simple shell script to get your machine's current local IP.
# type this in a terminal window to get your current local ip address:
ifconfig | grep 192 | awk '{print $2}'
# add this to whatever file runs when you open a new shell
# (~/.profile on OS X)
alias ip="ifconfig | grep 192 | awk '{print \$2}'"
# now you can type "ip" in a terminal window to get your local ip.
# note: you can replace "ip" with whatever you want.
@jakelodwick
jakelodwick / gist:3007505
Created June 27, 2012 23:15
horizontally center absolutely positioned elements
$(window).resize(function(){
$('#someElement').each(function(i) {
$(this).css('left', ($(this).parent().width() - $(this).outerWidth(true)) / 2);
});
}).resize();
@jakelodwick
jakelodwick / neat_r.php
Created January 8, 2011 17:27
neat_r, a tidy alternative to print_r (PHP)
<?PHP
/*
neat_r works like print_r but with much less visual clutter.
By Jake Lodwick. Copy freely.
Example with an array:
$data = array(
"mode" => "sets",