Skip to content

Instantly share code, notes, and snippets.

Justin J. Novack jnovack

Block or report user

Report or block jnovack

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
jnovack / alfred-4-open-iterm.applescript
Created May 31, 2019
Alfred 4 Custom Terminal Applescript to Open iTerm
View alfred-4-open-iterm.applescript
-- 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\"
View gist:61d08890137fb28e0cabf203505e670e
cat files | awk '{for(i=1;i<=NF;i++){ tmp=match($i, /PATTERN/); if(tmp){print $i}} }' | sort | uniq -c | sort -rn
View journal.go
package main
import (
journal ""
func j(message string) {
err := journal.Send(message, journal.PriInfo, tags)
if err != nil {
log.Fatalf("%s", err)
jnovack / break.go
Last active Sep 29, 2018
Handle CTRL-C in Golang
View break.go
package main
import (
jnovack / docker-compose.yml
Created Sep 17, 2018
Docker Swarm ElasticSearch Cluster (Exposed)
View docker-compose.yml
# Exposes the ElasticSearch cluster on :9200
# of all Docker Swarm Nodes (poor man's clustering)
# [NSFW] X-Pack-Security Disabled, Kibana-Monitoring Enabled
version: '3.7'
- "9200:9200"
jnovack /
Created Sep 9, 2018
awk word-wrap / trim at certain number of columns
# `export WIDTH=120` to change the width
## awk-wrap
alias wrap='awk -v WIDTH="${WIDTH:-72}" '\''
gsub("\t"," ")
$0 = line $0
while (length <= WIDTH) {
jnovack /
Created Apr 25, 2018
Variables of Variables in /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

Keybase proof

I hereby claim:

  • I am jnovack on github.
  • I am jnovack ( on keybase.
  • I have a public key whose fingerprint is BF9C 783D 2222 5964 3191 04A6 0CD0 19C2 B340 6656

To claim this, I am signing this object:

# Copyright 2011 VMware, Inc. All rights reserved.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
jnovack /
Created Oct 8, 2017
Custom Fibaro RGBW LED Controller in SmartThings

This extends the native SmartThings device handler to support editing the device's parameters from the SmartThings GUI, and to support the use of one or more of the controller's channels in IN/OUT mode.

First go to and select all, copy. Then Google search SmartThings IDE . Log in there, and then click on "My Device Handlers" and add new. Click "From Code" along the top then paste in the box. Hit "Save"

You can’t perform that action at this time.