Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Using: Save this as `.git/hooks/pre-push`
protected_branch='master'
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
if [ $protected_branch = $current_branch ]
then
read -p "You're about to push master, is that what you intended? [y|n] " -n 1 -r < /dev/tty
echo
if echo $REPLY | grep -E '^[Yy]$' > /dev/null
@jlyon
jlyon / git-bash_profile.sh
Last active November 10, 2021 04:50
git .bash_profile commands
# Git custom stuff https://gist.github.com/jlyon/e461fca78038e2390e845fb18dfd111a
gitListCommands()
{
echo ''
echo 'Git commands:'
echo ''
echo 'alias gb="git branch --sort=-committerdate"'
echo 'alias gbc="git branch {current}"'
echo 'alias gs="git status"'
echo 'alias gd="git diff"'
<!DOCTYPE html>
<html>
<body>
<!--
YouTube Video bookmark selector.
A Handlebars-based selector to create quicklink breakpoints on a Youtube video
-->
<div class="row">
{
"objectID": "444912",
"title": "Samsung MU6100 55\" 4K UHD LED LCD TV",
"primary_title": "Samsung MU6100 55\" 4K UHD LED LCD TV",
"secondary_title": null,
"category_id": 1960,
"category": "HD Televisions",
"updated_at": "2018-04-09T22:45:53.000+10:00",
"handle": "samsung-mu6100-55-4k-uhd-led-lcd-tv",
"vendor": "SAMSUNG",
@jlyon
jlyon / automated-testing.md
Last active February 8, 2018 00:41
Automated testing

Goals:

  • Tracktor frontend
    • Test weird carriers
    • Test manual status
    • Test maps?
    • Test weird order lookups?
    • Test liquid email link?
  • JB
    • Quickly gather screenshots of common workflows
  • Consumer apps
php7cc -o json coin | json_pp > coin.json
php7cc -o json uploadery | json_pp > uploadery.json
php7cc -o json customizery | json_pp > customizery.json
php7cc -o json bouncer | json_pp > bouncer.json
php7cc -o json kitkarts | json_pp > kitkarts.json
php7cc -o json smile | json_pp > smile.json
php7cc -o json tracktor | json_pp > tracktor.json
php7cc -o json pagestudio | json_pp > pagestudio.json
php7cc -o json blogstudio | json_pp > blogstudio.json
@jlyon
jlyon / install.sh
Last active November 17, 2017 20:13
pi3
sudo apt-get install -y git
# Install nodejs
# From https://raspberrypi.stackexchange.com/questions/48303/install-nodejs-for-all-raspberry-pi
sudo bash
sudo wget -O - https://raw.githubusercontent.com/audstanley/NodeJs-Raspberry-Pi/master/Install-Node.sh | bash
exit
node -v
npm install -g pm2
# pm2 usage: https://stackoverflow.com/a/40254977
@jlyon
jlyon / .block
Last active October 12, 2017 06:50 — forked from nbremer/.block
Data based orientations in SVG Gradients - Final example - Avenger Movie Collaborations
height: 1000
@jlyon
jlyon / d3.sketchy.js
Last active October 12, 2017 06:38 — forked from emeeks/d3.sketchy.js
Sketchy Network II
/*global d3:false */
/*jshint unused:false*/
/**
* Initiate the sketchy library
* @constructor
*/
var d3sketchy = function(){
/**
@jlyon
jlyon / .block
Last active October 1, 2017 21:58 — forked from mbostock/.block
World Tour
license: gpl-3.0