Skip to content

Instantly share code, notes, and snippets.

View nicknisi's full-sized avatar

Nick Nisi nicknisi

View GitHub Profile
@bgerrissen
bgerrissen / gist:715141
Created November 25, 2010 09:52
RequireJS cacheKey

reason

Offers a simple mechanism to allow extremely long expire-headers on scripts whilst still being able to switch to newer versions on the fly.

implementation

A js file defined with data-main attribute on the script tag of require.js, will always be loaded with current timestamp to always force a fresh load.

// main.js?cacheKey=TIMESTAMP-123412312321
@Espenhh
Espenhh / branch-blame.sh
Created September 29, 2012 14:55
Script that lists out all branches, how old they are, groups them by merged/notmerged, and "blames" who commited last
#!/bin/bash
# --------------------------- FUNCTIONS ---------------------------------
_line() {
printf %80s |tr " " "-"; echo ""
}
_info() {
echo -e 1>&2 "\033[32m"$@"\033[0m"
}
@mattdsteele
mattdsteele / ojug-jasmine.md
Created October 6, 2012 23:06
JavaScript testing with Jasmine
@pyro2927
pyro2927 / solarized.sh
Last active August 27, 2023 16:41
Solarized theme for tmux-powerline
# Solarized Theme
# Attempting to copy: http://ethanschoonover.com/solarized
# Example: http://i.imgur.com/T9BTRG4.png
if patched_font_in_use; then
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="⮂"
TMUX_POWERLINE_SEPARATOR_LEFT_THIN="⮃"
TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="⮀"
TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="⮁"
else
@gnarf
gnarf / ..git-pr.md
Last active April 12, 2024 22:00
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@aaronj1335
aaronj1335 / find_globals.md
Last active May 25, 2023 17:11
finding global variables

good unit tests framesworks in javascript will throw errors when you leak global variables. it can be massively difficult to trace down the offending lines of code in a large application. a quick and effective fix is to add the attached bit of javascript at the beginning of your application and open your debugger (chrome dev tools, firebug, node debugger, etc.).

you'll get a break point at the error and it's easy to fix from there.

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@neonstalwart
neonstalwart / local-selenium.md
Last active December 13, 2022 13:36
how to run intern self tests with a local selenium
$ brew install selenium-server-standalone chromedriver
$ git clone git@github.com:theintern/intern.git
$ cd intern
$ npm install --production
$ ln -s .. node_modules/intern
$ curl https://gist.github.com/neonstalwart/6630466/raw/f0e4e4efbefa40c746f7c68e2bb4fa0dd5215047/selftest.local.intern.js > tests/selftest.local.intern.js
$ java -jar /usr/local/opt/selenium-server-standalone/selenium-server-standalone-2.35.0.jar -p 4444 &
$ node node_modules/intern/runner.js config=tests/selftest.local.intern
@christoomey
christoomey / notes.md
Last active August 29, 2015 13:56
Vim & Tmux Boston IO Talk Notes
@rnelson
rnelson / README.md
Last active November 16, 2015 23:42
fuck you, program!

About

Need to kill a program? Make it fun.

$ fuck you firefox
(╯°□°)╯ firefox
$