Skip to content

Instantly share code, notes, and snippets.

@adamjstewart
adamjstewart / bash-paths.sh
Created October 2, 2016 17:15
Bash relative vs. absolute paths
#!/usr/bin/env bash
# There are many ways to get a path to a file or script.
# This script showcases several of them and their pitfalls.
# Credit for most of these techniques comes from:
# http://stackoverflow.com/questions/4774054/
abs_path='/usr/bin/bash'
rel_path='.'
@akger1379
akger1379 / jpb.js
Last active January 4, 2016 12:59
A solid starter template for your jQuery plugins. Inspired by https://github.com/jquery-boilerplate/jquery-boilerplate
/**
* JPB - JQUERY PLUGIN BOILERPLATE
* A solid starter template for your jQuery plugins.
* Inspired by http://jqueryboilerplate.com
* @copyright André Kroll
* @license MIT
*/
;
(function ($, window, document, undefined) {
var PLUGIN_NAME = 'my_plugin'; // (i) will give you later access with: $('div').my_plugin()