This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup sd card image (diskutil list - diskX, prepend with r), with progress (brew install pv), and gzip it | |
sudo dd if=/dev/rdisk1 bs=32m | pv -s 16G | gzip > backup.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build an image from Dockerfile in current dir | |
docker build -t image-name . | |
# List images | |
docker images | |
# List containers | |
docker ps | |
# Run a docker container from image, mount a live volume, and ssh into it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("%cI'm red - %cI'm green", 'color:red;', 'color:green;') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name EXAMPLE SCRIPT | |
// @version 0.8 | |
// @description This is an example showing Gist capability and how to auto update | |
// @author jbryson3 | |
// @include https://www.google.com | |
// @grant none | |
// @updateURL https://gist.github.com/jbryson3/daabe54f25c4f71d6dee/raw/example.user.js | |
// @downloadURL https://gist.github.com/jbryson3/daabe54f25c4f71d6dee/raw/example.user.js | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create release branch of current directory repository off of develop without changing your working directory | |
# ./create-release-branch.sh new-release | |
git branch release/$1 origin/develop | |
git push -u origin release/$1 | |
git branch -d release/$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -rl "require 'modules.*'" . | xargs sed -i "" "s/require 'modules(.*)'/require 'master-chief-cli$1'/g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var JSZip = require('jszip'); | |
var zip = new JSZip(); | |
zip.file('image0.png', require('fs').readFileSync('files/image0.png'), {compression: "DEFLATE"}); | |
var content = zip.generate({type:"nodebuffer"}); | |
require('fs').writeFileSync('zippy.zip', content); |