Skip to content

Instantly share code, notes, and snippets.

View joshuaconner's full-sized avatar

Joshua Conner joshuaconner

View GitHub Profile
@joshuaconner
joshuaconner / playbook1.yml
Created December 3, 2013 03:15
env-or-else with Ansible... possible?
---
- name: test jinja2 default filter
hosts: localhost
gather_facts: False
tasks:
- name: debug
debug: msg="{{ lookup('env', 'UNDEFINED_THING')|default('foo') }}"
Denying load of chrome-extension://[Chromoji extension ID]/jquery.min.map. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
// think of this as the "constructor" function - returns a GridSpace object
// so do your init stuff here
var GridSpace = function (x, y, height) {
this.x = x;
this.y = y;
this.height = height;
};
// this of this as sort of the "class definition", define your other functions here
// be warned though: everything in the prototype is shared between all GridSpace instances!
@joshuaconner
joshuaconner / dabblet.css
Created June 6, 2013 00:09
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
/*flickering Neon*/
@keyframes neon {
0%, 9%, 12%, 13%, 16%, 75%, 78%, 80%, 83%, 100% {
text-shadow: 0 0 5px #fff,
0 0 10px #fff,
@joshuaconner
joshuaconner / batch_resize.sh
Last active December 13, 2015 16:39
Copy this into your .bash_profile! Bash function to batch-resize images according to the geometry specified in resize-arg. If no destination directory is specified, the converted images' filenames have "-resized" appended so as to not overwrite the original images.
resize () {
SUFFIX="-resized"
if [ -n "$1" ] ; then
if [ ! -f "${@: -1}" ] ; then
SUFFIX=""
DEST="${@: -1}"
mkdir -p "$DEST"
fi
geom="$1"
@joshuaconner
joshuaconner / gist:4273530
Created December 13, 2012 02:27
using bash to lowercase file extensions
for f in *.JPG; do mv "$f" "${f%.*}.jpg"; done