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 / install_tmux.sh
Last active January 17, 2024 18:05
tmux installation on Mac OSX Catalina
#!/bin/sh
## setup _________________________________
TMUX_VER=3.3a
LIBEVENT_VER=2.1.12-stable
OPENSSL_VER=1_1_1v
TEMP_COMPILE=~/tmux-temp-compile
COMMON_INSTALL_PREFIX=/opt
SYMLINK=/usr/local/bin/tmux
@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 / untitled.js
Created July 23, 2020 15:08
ServiceNow - Decrypt sys_auth_profile_basic Password
var sysid = "INSERT_SYS_ID_HERE";
var Encrypter = new GlideEncrypter();
var gr = new GlideRecord('sys_auth_profile_basic');
gr.addQuery("sys_id", sysid);
gr.query();
while (gr.next()) {
var encrypted = gr.password;
var decrypted = Encrypter.decrypt(encrypted);
gs.addInfoMessage(decrypted);
}
@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 / lscolors.zsh
Created October 19, 2019 11:34
LSCOLORS for zsh
export LSCOLORS=ExFxBxDxCxegedabagacad
@jnovack
jnovack / alfred-4-open-iterm.applescript
Created May 31, 2019 11:14
Alfred 4 Custom Terminal Applescript to Open iTerm
-- Alfred 4 Custom Terminal Script for iTerm
-- To Install, copy to: Alfred --> Features --> Terminal --> Custom
on alfred_script(q)
if application "iTerm2" is running or application "iTerm" is running then
run script "
on run {q}
tell application \"iTerm\"
activate
try
cat files | awk '{for(i=1;i<=NF;i++){ tmp=match($i, /PATTERN/); if(tmp){print $i}} }' | sort | uniq -c | sort -rn