Skip to content

Instantly share code, notes, and snippets.

View aa6my's full-sized avatar
😈
curiosity

aa6mys aa6my

😈
curiosity
View GitHub Profile
?full&json%27
@aa6my
aa6my / cid.js
Created May 21, 2019 08:00
cid.js
var cid;
ga(function(tracker) {
cid = tracker.get('clientId'));
});
@aa6my
aa6my / jq-cheetsheet.md
Created October 25, 2019 06:43 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@aa6my
aa6my / KTM_stuff.md
Created January 9, 2020 14:05
KTM Stuff
https://www.ktmforums.com/threads/ktm-orange-paint-code.21497/
@aa6my
aa6my / README.md
Created January 16, 2020 03:37 — forked from simov/README.md
Run `node` scripts using `nvm` and `crontab` without hardcoding the node version

Run node scripts using nvm and crontab without hardcoding the node version

cronjob.env.sh

#!/bin/bash

# NVM needs the ability to modify your current shell session's env vars,
# which is why it's a sourced function
@aa6my
aa6my / S3CloudFront.MD
Last active February 6, 2020 08:41
S3CloudFront
CORS S3 + Cloudfront configuration
<CORSConfiguration>
	<CORSRule>
		<AllowedOrigin>*</AllowedOrigin>
		<AllowedMethod>POST</AllowedMethod>
		<AllowedMethod>GET</AllowedMethod>
		<AllowedMethod>PUT</AllowedMethod>
 DELETE
@aa6my
aa6my / dump_route53_records.md
Created April 22, 2020 03:37 — forked from porjo/dump_route53_records.md
Export route53 records to CSV

Retrieve hosted zones with aws route53 list-hosted-zones then enter the zone Id below:

aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/xxxxxxxxxxx" | \
   jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?]  | @tsv'
@aa6my
aa6my / POSH Stuff
Created May 6, 2020 13:49 — forked from easel/POSH Stuff
Windows Terminal Configuration
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
Then run "notepad $PROFILE" and add these lines to the end:
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
@aa6my
aa6my / fix_quotes.sh
Created May 12, 2020 02:53 — forked from kamermans/fix_quotes.sh
Replace fancy-quotes / curly-quotes / smart-quotes with standard ASCII single- and double-quotes in bash
#!/bin/bash
# Replaces annoying "fancy" quotes created by programs like Microsoft Word and everything in MacOS
# with normal ASCII single-quotes (') or double-quotes (")
# This script does NOT replace the GRAVE ACCENT (`) since it is commonly used in Markdown and as a bash command
# See: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
SINGLE=$(echo -ne '\u00B4\u2018\u2019')
DOUBLE=$(echo -ne '\u201C\u201D')
sed -i "s/[$SINGLE]/'/g; s/[$DOUBLE]/\"/g" $1
@aa6my
aa6my / aws.MD
Created June 18, 2020 08:17
AWS IP Range
150.222.78.0/24, 15.193.2.0/24, 52.219.48.0/22, 15.230.29.0/24, 15.177.82.0/24, 122.248.192.0/18, 54.169.0.0/16, 52.144.224.128/26, 54.239.0.96/28, 103.246.148.0/23, 54.255.0.0/16, 52.95.255.32/28, 175.41.128.0/18, 13.250.0.0/15, 64.252.102.0/24, 99.77.143.0/24, 52.144.231.64/26, 99.82.173.0/24, 52.76.128.0/17, 52.219.32.0/21, 52.93.8.0/22, 64.252.103.0/24, 15.221.8.0/21, 52.74.0.0/16, 54.179.0.0/16, 13.248.127.0/24, 52.220.0.0/15, 18.142.0.0/15, 46.137.192.0/19, 43.250.192.0/24, 46.137.224.0/19, 46.51.216.0/21, 52.94.248.32/28, 52.219.40.0/22, 150.222.108.0/24, 54.254.0.0/16, 54.151.128.0/17, 52.219.124.0/22, 18.136.0.0/16, 13.212.0.0/15, 52.93.63.0/24, 52.95.35.0/24, 64.252.104.0/24, 52.219.128.0/22, 18.140.0.0/15, 52.95.212.0/22, 15.230.6.0/24, 52.93.19.237/32, 52.95.242.0/24, 54.240.227.0/24, 54.240.199.0/24, 99.77.161.0/24, 203.83.220.0/22, 52.219.132.0/22, 52.94.198.96/28, 52.94.11.0/24, 150.222.219.0/24, 18.138.0.0/15, 52.93.19.236/32, 52.119.205.0/24, 52.76.0.0/17, 52.119.184.0/22, 54.251.0.0/16,