Skip to content

Instantly share code, notes, and snippets.

View quickstep25's full-sized avatar

Doug Hill quickstep25

View GitHub Profile
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEDIT/TEXTWRANGLER REGULAR EXPRESSION GUIDE MODIFIED 2014-01-13 : 00:12
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@quickstep25
quickstep25 / bs3-progress-bars.css
Created October 26, 2014 07:47
Bootstrap 3 Progress Bars Snippets
.progress {
position: relative;
height: 25px;
}
.progress > .progress-type {
position: absolute;
left: 0;
font-weight: 800;
padding: 3px 30px 2px 10px;
color: rgb(255, 255, 255);
@quickstep25
quickstep25 / git-total-reset
Created October 24, 2014 01:11
GitHub - Complete reset of repository to upstream / master.
git remote add upstream /url/to/original/repo
git fetch upstream
git checkout master
git reset --hard upstream/master
git push origin master --force
@quickstep25
quickstep25 / get-referrer.js
Last active August 29, 2015 14:07
get http referrer
var url = "http://pheonix.local:5757/"
var referrer = url.match(/:\/\/(.+)/)[1];
@quickstep25
quickstep25 / dwcc-re-cheatsheet.txt
Last active August 29, 2015 14:07
Dreamweaver - Regex - Cheatsheet
. Any single character, except a newline
\d Any digit character (0-9)
\D Any non-digit character—in other words, anything except 0-9
\w Any alphanumeric character or the underscore
\W Any character, except an alphanumeric character or the underscore
\s Any white-space character, including space, tab, form feed, or line feed
\S Any character, except a white-space character
\f A form feed character
\n A line feed character
\r A carriage return character
@quickstep25
quickstep25 / months-abbr-array.json
Last active February 7, 2018 18:57
Months - ABBR - JSON
["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
@quickstep25
quickstep25 / update_time.js
Created August 20, 2014 21:13
Moment - Update Time
(function update_time(){
var now = moment().format('h:mm:ss a');
$('.timer').text(now);
setTimeout(update_time, 1000);
})();
@quickstep25
quickstep25 / jslint-browser.js
Created August 16, 2014 00:32
Global Scope for Browsers
/*jslint browser: true, indent: 4 */
@quickstep25
quickstep25 / JavaScript-Global-Vars-Template.js
Last active August 29, 2015 14:05
JavaScript - IIFE TEMPLATE - when minified the code variables in scope will be minimized as well. - ref: http://toddmotto.com/what-function-window-document-undefined-iife-really-means/
// IIFE Functions in JavaScript
(function ($, window, document, undefined) {
'use strict';
$(document).ready(function () {
// .. javascript code here ...
});
@quickstep25
quickstep25 / update-forked-git
Last active August 29, 2015 14:05
How to Update Forked Repository
# Add the remote, call it "upstream":
git remote add upstream https://github.com/whoever/whatever.git
# Fetch all the branches of that remote into remote-tracking branches,
# such as upstream/master:
git fetch upstream
# Make sure that you're on your master branch: