Skip to content

Instantly share code, notes, and snippets.

View jnovack's full-sized avatar
😠
Changing tabs to spaces...

Justin J. Novack jnovack

😠
Changing tabs to spaces...
View GitHub Profile
#include <Adafruit_NeoPixel.h>
/* halloween.ino
* https://gist.github.com/jnovack/ce208617a2ec53af11d674b20b127c9a/
* 2021 - Justin J. Novack
*
* When the PIN_PIR is rising (from LOW to HIGH, e.g. 0V to 5V), turn on the pixels
* in a random order waiting DELAY_ON between each pixel, then wait DELAY_WAIT before
* starting to turn the pixels off, waiting DELAY_OFF between each pixel.
*
@jnovack
jnovack / Makefile
Last active November 23, 2020 03:35
bash_completion on OSX without Homebrew
all:
@echo "WARNING: Installation requires your sudo access, please enter your password when prompted."
@echo " ... press Enter to continue... "
@read
curl -LOs https://src.fedoraproject.org/repo/pkgs/bash-completion/bash-completion-1.3.tar.bz2/a1262659b4bbf44dc9e59d034de505ec/bash-completion-1.3.tar.bz2
curl -LOs https://raw.githubusercontent.com/Homebrew/formula-patches/c1d87451da3b5b147bed95b2dc783a1b02520ac5/bash-completion/bug-740971.patch
curl -LOs https://gist.githubusercontent.com/jnovack/e66f40e7a31e04f909c2f503c6df7367/raw/287b97a1f24bb47746248a15659b9478e6ec8e02/osx.patch
curl -LOs https://gist.github.com/jnovack/e66f40e7a31e04f909c2f503c6df7367/raw/SHA256SUMS
shasum -c SHA256SUMS || (@echo "There was an error downloading one or more files... please try again."; exit 1)
tar -xzvf bash-completion-1.3.tar.bz2
@jnovack
jnovack / alpine.yml
Last active August 21, 2020 15:33
ansible bootstrap a clean installation
---
- name: Bootstrap Alpine
hosts: all
gather_facts: false
become: no
vars:
ansible_python_interpreter: auto_silent
tasks:
@jnovack
jnovack / answer.txt
Created August 10, 2020 19:37
setup-alpine answer file
# setup-alpine answer file
# Set hostname to alpine-test
HOSTNAMEOPTS="-n alpine-test"
# Use US layout with US variant
KEYMAPOPTS="us us"
# Contents of /etc/network/interfaces
INTERFACESOPTS="auto lo
@jnovack
jnovack / README.md
Last active June 26, 2020 18:00
Using Linux Display on OSX in docker
@jnovack
jnovack / regex.js
Created June 18, 2020 13:29
Docker Hub Regex for Non-Master Branches
/^([^m].....|.[^a]....|..[^s]...|...[^t]..|....[^e].|.....[^r]|.{0,5}|.{7,})$/
@jnovack
jnovack / test-for-ssh-extension.js
Last active June 14, 2020 17:24
Chrome Test for SSH Extension
var detect=function(base,if_installed,if_not_installed){
var s=document.createElement("script");
s.onerror=if_not_installed,s.onload=if_installed,document.body.appendChild(s),s.src=base+"/html/nassh.html"
};
detect("chrome-extension://pnhechapfaindjhompbnflcldabbghjo",
function(){
console.log("Yes");
},
function(){
@jnovack
jnovack / nginx.conf
Created July 25, 2016 16:02
nginx Reverse SSL Proxy
# /etc/nginx/nginx.conf
# ...
http {
# ...
include /etc/nginx/sites-enabled/*.conf
}
@jnovack
jnovack / lscolors.zsh
Created October 19, 2019 11:34
LSCOLORS for zsh
export LSCOLORS=ExFxBxDxCxegedabagacad
@jnovack
jnovack / file_env.sh
Created April 25, 2018 20:56
Variables of Variables in /bin/sh
#!/bin/sh
file_env() {
local envVar="$1"
local fileVar="${envVar}_FILE"
eval envVarContents="\$${envVar}"
eval fileVarContents="\$${fileVar}"
if [ ! -z "$envVarContents" ] && [ ! -z "$fileVarContents" ]; then
echo >&2 "error: both $envVar and $fileVar are set (but are exclusive)"
exit 1
fi