This file contains hidden or 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
/** | |
* @desc An attempt at persistent browser console log history | |
* @note How To Use: | |
* 1) Copy/paste all below JS into the browsers JS console | |
* 2) Use any of the console.log/debug/warn/error functions | |
* 3) Refresh the page | |
* 4) Repeat steps #1 & #2 a few times | |
* 5) Execute export_console_logs via the browser console (passing the log type as the only argument) to get the log history | |
* @see https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API | |
*/ |
This file contains hidden or 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
#!/usr/bin/env awk -f | |
# | |
# THIS IS CURRENTLY BROKEN - im working on it. | |
# | |
# Description: Grabs the fully executed command by using the ps command to find the "args" data | |
# for the pid PROCINFO["pid"], then parses it by looking for any awk variables set | |
# using -v or --assign via the execution. | |
# |
This file contains hidden or 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
#!/usr/bin/env awk -v cmd=sh -v goto=last -f | |
# Output of Grep command | |
# $ grep -RnHsi waldo scripts | |
# scripts/find-user.js:3:if ( process.argv.length > 1 && process.argv[2] === 'Waldo' ) | |
# scripts/find-user.js:4: console.log("You ARE lookin for Waldo") | |
# scripts/find-user.js:6: console.log("You are NOT lookin for Waldo") | |
# scripts/find-user.sh:4:if test -n $1 && [[ $1 == 'Waldo' ]]; then | |
# scripts/find-user.sh:5: echo "You ARE lookin for Waldo" | |
# scripts/find-user.sh:7: echo "You are NOT lookin for Waldo" |
This file contains hidden or 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
dialog --textbox /Users/jhyland/CPU.txt 20 120 | |
dialog --title "Dialog #1" \ | |
--keep-window \ | |
--begin 2 2 --yesno "" 0 0 \ | |
--and-widget --clear --title "Dialog #2" --begin 4 4 --yesno "" 0 0 \ | |
--and-widget --title "Dialog #3" --begin 6 6 --yesno "Yesno box" 20 40 \ | |
--and-widget --clear --title "Dialog #4" --begin 4 4 --textbox content/CPU.txt 30 120 \ | |
--add-widget --clear --title "Some Gauge" --gauge "Fooo" 20 100 30 |
This file contains hidden or 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
#!/usr/local/bin/bash | |
declare -A cfg | |
cfg['app']='com.microsoft.Outlook' | |
cfg['limit']='20' | |
proc_pid=$(lsappinfo info ${cfg['app']} -only pid | cut -d '=' -f2) | |
if [[ -z ${proc_pid} ]]; then | |
echo "Unable to find Outlook running" 1>&2 |
This file contains hidden or 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
function _err { | |
echo "${1}" 1>&2 | |
[[ -n $2 ]] && exit $2 | |
} | |
function trim { | |
if test -p /dev/stdin; then | |
data="$(</dev/stdin)" |
This file contains hidden or 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
function verify(button) { | |
document.getElementById('verify').innerHTML = 'Processing...'; | |
aes_key_verify(); | |
} | |
/* | |
* JavaScript AES implementation using Counter Mode | |
* | |
* Copyright (c) 2010 Robert Sosinski (http://www.robertsosinski.com) | |
* Offical Web Site (http://github.com/robertsosinski/js-aes) |
This file contains hidden or 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
function __trim { | |
if test -p /dev/stdin; then | |
data="$(</dev/stdin)" | |
elif test -n "${1}"; then | |
data="$*" | |
else | |
return 1 | |
fi | |
echo "${data}" | sed -E -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' |
This file contains hidden or 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
declare -A _c | |
_c[reset]=$(tput sgr0) | |
_c[bold]=$(tput bold) | |
_c[red]=$(tput setaf 1) | |
_c[grn]=$(tput setaf 2) | |
_c[yel]=$(tput setaf 3) | |
_c[cya]=$(tput setaf 6) |
This file contains hidden or 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
#!/usr/bin/bash | |
function trim { | |
if test -p /dev/stdin; then | |
data="$(</dev/stdin)" | |
elif test -n "${1}"; then | |
data="$*" | |
else | |
return 1 | |
fi |