Skip to content

Instantly share code, notes, and snippets.

Justin Endler justin-endler

Block or report user

Report or block justin-endler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
justin-endler /
Last active Sep 5, 2018
mv to destination, same name
# get source and destination parent
if [[ -z $1 ]]; then
echo "source and destionation parent arguments required"
exit 1
justin-endler / javascript.json
Last active Apr 4, 2018
VS Code JavaScript User Snippet
View javascript.json
"Test flag": {
"prefix": "test",
"body": [
"// @test"
"description": "Flag line as testing only"
"Todo flag": {
"prefix": "todo",
justin-endler / findSelectors.js
Last active Mar 13, 2017
Find css selectors in js file
View findSelectors.js
'use strict';
const file = 'some_file.js';
const ignore = [
justin-endler / mobile-width-helpers.js
Last active Oct 14, 2016
Mobile Width Problem Helpers
View mobile-width-helpers.js
// not for production use
function MobileWidthHelpers () {
this.stringName = stringName;
var ignoreElements = [
function stringName ($el) {
justin-endler / indefinite_mutation_observer.js
Last active Oct 4, 2016
MutationObserver: Listen Indefinitely On Changing Element
View indefinite_mutation_observer.js
// support multiple browsers
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
var elementId = 'some-id';
// instantiate initial observer
var observer = new MutationObserver(observeIndefinitely(elementId));
observer.observe(document.getElementById(elementId), {
// expensive, only use what's needed of these
attributes: true,
childList: true,
justin-endler /
Created Apr 20, 2016
copy current git branch to clipboard
echo -n "$(git rev-parse --abbrev-ref HEAD)" | pbcopy
View test.sublime-snippet
// @test
View todo.sublime-snippet
// @todo
justin-endler /
Last active Dec 29, 2015
General node.js Express app deployment script for Heroku.
# requires that node app.js be contained in a Procfile
# ./ <NODE_ENV> <local_branch_to_push> <app_to_destroy_if_redeploy>
# validate minimal input
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Run with at least NODE_ENV and local_branch_to_push as arguments $1 and $2"
exit 1
justin-endler / console_info.sublime-snippet
Last active Dec 28, 2015
Sublime snippet for quick insertion of a labeled
View console_info.sublime-snippet
<content><![CDATA['${1:thing}:', ${1}); // @test
You can’t perform that action at this time.