Skip to content

Instantly share code, notes, and snippets.

View JDiPierro's full-sized avatar

Justin DiPierro JDiPierro

View GitHub Profile
#!/usr/bin/env bash
# Takes a 24-hour time as the first argument and displays the second argument as a Mac dialog at that time.
# Usage:
# $ timebox 15:00 "Refresh the dashboard"
TARGET="${1}"
if [[ -z "${TARGET}" ]] ; then
echo "You must pass a time as the first argument" >&2
exit 1
@JDiPierro
JDiPierro / relax.sh
Last active October 3, 2019 00:31
Guided Box Breathing
function relax {
function typecat {
type lolcat &>/dev/null && lolcat -p .4 || cat;
}
function sleepcount {
for i in {1..4}; do echo -en " $i" && sleep 1; done
}
function mantra {
echo -en "\r\033[K $1" | typecat -p .8
sleepcount
@JDiPierro
JDiPierro / other-slack-style.css
Last active January 17, 2019 19:15
Another Slack Style
/*
Copyright 2017 Bryan Keller (https://github.com/widget-)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@JDiPierro
JDiPierro / black.css
Last active January 17, 2019 16:52
Slack Style
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }

Keybase proof

I hereby claim:

  • I am jdipierro on github.
  • I am jdipierro (https://keybase.io/jdipierro) on keybase.
  • I have a public key ASA1CnALp_PRDrB5dObJaQ3Wdb6CImVsjpBhDEgnRKJTqwo

To claim this, I am signing this object:

@JDiPierro
JDiPierro / auto_mine.au3
Last active January 7, 2018 15:45
Autostart Claymore miner after computer is idle
#include <Timers.au3>
#include <Date.au3>
#include <Process.au3>
#Include <WinAPI.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <Array.au3>
;;;;;;;;;;;;;;;;;;;;;
;; IdleMiner Config ;
@JDiPierro
JDiPierro / osx-slack-dark.css
Last active December 22, 2017 17:35
Slack Dark Theme
#msgs_scroller_div::-webkit-scrollbar-track, #client_body::before, .client_container,
#search_terms, #client_body, #footer, ts-message, .channel_header, ts-jumper ts-jumper-container,
ts-jumper input[type="text"],
.supports_custom_scrollbar:not(.slim_scrollbar) #col_channels:hover #channels_scroller::-webkit-scrollbar-track,
.feature_sli_file_search #search_results.all, .feature_sli_file_search #search_results.messages,
.feature_sli_file_search #search_results.files{
background: #333 !important;
}
.feature_sli_file_search #search_results.all .search_message_result, .feature_sli_file_search #search_results.messages .search_message_result,
@JDiPierro
JDiPierro / gist:387882b4b34636c57efc1b9b26745ba4
Created June 28, 2017 17:30
Terraform plan ignores -state flag
$ TF_LOG=TRACE terraform plan -state=terraform/test/terraform.tfstate
2017/06/28 13:29:15 [INFO] Terraform version: 0.9.9
2017/06/28 13:29:15 [INFO] Go runtime version: go1.8.3
2017/06/28 13:29:15 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.9.9/bin/terraform", "plan", "-state=terraform/test/terraform.tfstate"}
2017/06/28 13:29:15 [DEBUG] Detected home directory from env var: /Users/justin
2017/06/28 13:29:15 [DEBUG] Detected home directory from env var: /Users/justin
2017/06/28 13:29:15 [DEBUG] Attempting to open CLI config file: /Users/justin/.terraformrc
2017/06/28 13:29:15 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/06/28 13:29:15 [INFO] CLI command args: []string{"plan", "-state=terraform/test/terraform.tfstate"}
2017/06/28 13:29:15 [DEBUG] Detected home directory from env var: /Users/justin
function vnuke() {
if [ $# -ne 0 ]; then
vagrant destroy -f $@
return
fi
running_vms=`vagrant status | grep running | awk '{ print $1 }' | xargs`
echo $running_vms
for killme in `echo $running_vms`; do
vagrant destroy -f $killme
done