Skip to content

Instantly share code, notes, and snippets.

View jhyland87's full-sized avatar

J jhyland87

View GitHub Profile
@jhyland87
jhyland87 / AmazonUIPageJS-when.list
Created September 18, 2018 20:44
Output of: grep '\.when' * | grep -Eo '\.when\("[a-zA-Z0-9:[:space:]",\-]+"' | sed -E -e 's/^\.when\("//g' -e 's/"//g' -e 's/, /,/g' | tr ',' '\n' | sort -u | grep -Ev '^$'
3p-fabricjs
3p-promise
A
Airy
AmazonCustom:BrowserSpecific:DisableBFCache
CountryNames
DigitalDashAddListeners
DigitalDashCreateForm
DigitalDashUtils
EDPUtils
@jhyland87
jhyland87 / AmazonUIPageJS-execute.list
Created September 18, 2018 20:12
Results from grep '\.when' * | grep -Eo '\.execute\(".+",' | sed -E -e 's/^\.execute\("//g' -e 's/",$//g'
DigitalDashAutoAction
DigitalDashPopoverManager
ac-popover-metrics
ac:olp:init
add-to-cart-refresh
addSuppliersButton
aloha.carrierCompatibility.onStart
attach-dss-js
atwl-dropdown
atwl-huc
var PrefixedLog = function( prefix, style ) {
if ( ! prefix || typeof prefix !== 'string' ) return;
this.prefix = prefix;
this.prefixFormat = '[%c%s%c]';
this.style = (typeof style === 'string' ? style : 'color: grey; font-weight: bold');
this.unstyle = 'color: none; font-weight: none';
};
PrefixedLog.prototype.initArgs = function(){
declare -A CFG
CFG[tmp.prefix]="ip-dns-parse"
CFG[tmp.file.file-list]="files-to-parse.list"
CFG[tmp.file.grep-results]="grep-results.list"
CFG[tmp.file.pruned-grep-results]="pruned-grep-results.list"
CFG[output.result]="./results"
@jhyland87
jhyland87 / csv-from-grep.sh
Created August 15, 2018 19:42
Parses the grep output and generates CSV file content (sent to STDOUT)
#!/usr/local/bin/bash
declare -A CFG
#CFG['ignore.filetype']
# Grep for DNS and IP records
# grep -IERnHis --exclude-dir={.git,.gitmodules} '(192\.168\.78\.[0-9]{1,3}|10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|\.(mywebsite|abcstaging)\.com)' liberty-{cron,magento,misc,models,portal,reports,services,ship{,-{client,server}},sweet,ups,warehouse} > ip-dns-references.txt
[Tue Aug 14 09:46:02| 0:000]{1:193}jdoe@MacBook-Pro:/Volumes(✓)$ df /Volumes/Secure
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk4s1 35372096 1566528 33805568 5% 0 0 100% /Volumes/Secure
[Tue Aug 14 09:46:06| 0:000]{1:194}jdoe@MacBook-Pro:/Volumes(✓)$ ls /Volumes/Secure
chemdocs credentials data.tar.gz.enc scripts test test-data test-data.tar.gz.enc tor
[Tue Aug 14 09:46:09| 0:000]{1:195}jdoe@MacBook-Pro:/Volumes(✓)$ cd /Volumes/Secure
[Tue Aug 14 09:46:11| 0:000]{1:196}jdoe@MacBook-Pro:/Volumes/Secure(✓)$ ls
.
[Tue Aug 14 09:52:28| 0:000]{1:27}jdoe@MacBook-Pro:/Volumes/Secure(✓)$ ls .
.
@jhyland87
jhyland87 / encrypted-compressed-archive.sh
Created July 3, 2018 19:37
Generate a GZIP compressed TAR archive thats AES-256 encrypted and password protected
# Create encrypted folder with password specified in the command (CHANGEME)
tar cz -P -C ./data ./ | openssl enc -aes-256-cbc -salt -pass "pass:CHANGEME" -a -A -e -out encrypted-compressed-archive.tar.gz.enc
# Decrypt above file
openssl enc -aes-256-cbc -a -A -d -pass "pass:CHANGEME" -in ./encrypted-compressed-archive.tar.gz.enc | tar xz -C ./data
# Same thing as the above, but password isn't specified (which means the password will be requested)
tar cz -P -C ./data ./ | openssl enc -aes-256-cbc -salt -a -A -e -out encrypted-compressed-archive.tar.gz.enc
openssl enc -aes-256-cbc -a -A -d -in ./encrypted-compressed-archive.tar.gz.enc | tar xz -C ./data
[
[
[
null,
null,
null,
null,
{},
{},
{}
[
[
[
null,
null,
null,
null,
{},
{},
{}
@jhyland87
jhyland87 / color-scale.png
Last active June 26, 2018 17:25
Color Scale
color-scale.png