Skip to content

Instantly share code, notes, and snippets.

View eschie's full-sized avatar
👾
sweltering in space

Austin Eschenbach eschie

👾
sweltering in space
View GitHub Profile
@eschie
eschie / My bash profile
Created May 16, 2014 16:59
My bash profile
### Aliases
# Open specified files in Sublime Text
# "s ." will open the current directory in Sublime
alias s='open -a "Sublime Text 2"'
alias bp='open ~/.bash_profile'
# Color LS
colorflag="-G"
alias ls="command ls ${colorflag}"
/*
* AnythingSlider Video Controller 1.3 beta for AnythingSlider v1.6+
* By Rob Garrison (aka Mottie & Fudgey)
* Dual licensed under the MIT and GPL licenses.
*/
(function($) {
$.fn.anythingSliderVideo = function(options){
//Set the default values, use comma to separate the settings, example:
var defaults = {
@eschie
eschie / gist:2159048
Created March 22, 2012 15:31
Script of my homepage including featured post video slider (AnythingSlider) and bottom cartridge image hover
<script>
$(function(){
$('#slider1').anythingSlider({
resizeContents : true,
addWmodeToObject : 'transparent',
enableNavigation : false,
buildArrows : false,
easing : 'easeInOutCubic'
})
@eschie
eschie / my_first_pubsub
Created November 11, 2013 00:40
My First Pub/Sub
/* MY FIRST PUB/SUB jQuery
* ESCHIE/DESIGN_PATTERNS
*
*/
(function($) {
var o = $( {} );
$.each({
trigger: 'publish',
@eschie
eschie / jQueryPluginShell
Created November 13, 2013 03:46
jQ plugin shell
// Polyfill -- Extend Object.create for older browsers
if ( typeof Object.create !== 'function' ){
Object.create = function ( obj ) {
function F();
F.prototype = obj;
return new F();
};
}
(function( $, window, document, undefined ) {
while read url; do curl -o $(basename $url.html) "$url"; done < ../urllist.txt
tail -n +2 test.css > test.css
# remove up to the second line (remove first line) of a file and output to new file
for file in *.css; do tail -n 7 "$file" > "${file%.css}".new.css; done
@eschie
eschie / FBfix
Last active September 21, 2016 06:50
Facebook Broken Link Fix - Bookmarklet for Safari iOS
javascript:void((function(){var%20u%20=%20decodeURIComponent(window.top.location.href);var%20sub1%20=%20'https://m.facebook.com/lsr.php?u=';%20window.top.location.href%20=%20u.substring(sub1.length,%20u.indexOf('&ext'));})())
`cat>/dev/null` redirects the command standard output to the null device, special device which discards the information written to it.
@eschie
eschie / bash_script_template.sh
Created April 22, 2020 18:04
Start new bash scripts with...
#!/usr/bin/env bash
set -euo pipefail