This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# -------------------------------------------------------------------- | |
# metaphorpsum.sh | |
# | |
# Generate some metaphorical filler text via the API at | |
# metaphorpsum.com | |
# | |
# -------------------------------------------------------------------- | |
usage() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# dmv: prefix each file with its modified date | |
# backup the 'field separator' characters and remove spaces from current IFS. | |
# this allows handling of files with spaces. | |
FMT="%Y%m%d-" | |
FML="%Y-%m-%d_" | |
FMH="%Y%m%d_%H%M-" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ==================================================================== | |
if echo "$1" | grep -q -e '^-\+h\(elp\)\?$'; then | |
(cat <<EOF | |
bump-package | |
Update Bower and NPM package versions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
FIND=$(echo "$1" | sed -e 's/[\/&]/\\&/g') | |
shift | |
REPL=$(echo "$1" | sed -e 's/[\/&]/\\&/g') | |
shift | |
# EXPR="s/"${FIND}"/"${REPL}"/g" | |
OPTIONS="$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jQuery.populateDataProps() | |
* ========================== | |
* | |
* Find inputs with a [data-value-prop] attribute and set their value | |
* to the 'content' attribute of an children of $source whose | |
* [itemprop] matches the input's [data-value-prop]. | |
* | |
* Example | |
* ------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ========================================================================== | |
# | |
# Change Directory To... | |
# | |
# INSTALLATION | |
# | |
# Source this file in your Bash configuration (e.g. .profile, .bashrc) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# mstamp.sh: prefix each file with its modified date | |
# ================================================================== | |
function _mt() { | |
echo $(/usr/bin/stat -t $1 -f %Sm "$2") | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "$#" -ge 2 ] | |
then | |
DBNAME="$1"; shift | |
PREFIX="$1"; shift | |
else | |
echo "usage: mysql-dump-like.sh <database> <table_prefix> [<mysql_options...>]" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var GeoDistance = (function () { | |
var _d = {}; | |
// Earth Radius, in Miles | |
_d.RADIUS = 3958.7615; | |
_d.RAD_LAT = 3963.1906; | |
_d.RAD_LNG = 3949.9028; | |
_d.rad = function ( x ) { |
NewerOlder