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
| #!/bin/bash | |
| # list of my favorite atom packages to relieve my pain transitioning to a new computer | |
| # get a full list of apm packages in a single line | |
| # apm list -ib | cut -d@ -f1 | tr '\n' ' ' | |
| # web | |
| apm install -y atom-html-preview | |
| # autocomplete |
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 python | |
| # Usage: | |
| # python script.py idk | |
| # python script.py whatever okay | |
| import click | |
| # the main group | |
| @click.group() | |
| def main(): |
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 python | |
| # Sometimes you get a mailto link and it opens up a mail client that you never | |
| # use and on top of that, the mailto url is url encoded so it's full of | |
| # percent characters. Instead of having to decode it manually or put it in a | |
| # website to decode, I decided to write up this solution. | |
| # | |
| # Usage: | |
| # install mailto-english.py /usr/local/bin/mailto-english | |
| # mailto-english "mailto:jobs%40gravitational.com?subject=Application%20for%20DevOps%20Engineer%20at%20Gravitational&body=Hi%21%0A%0AI%27d%20like%20to%20apply%20for%20your%20position%20for%20a%20DevOps%20Engineer%20at%20Gravitational" |
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
| # Comma and new line delimited list of equivalent domains for password managers | |
| # Source: https://meta.stackexchange.com/a/81383/386515 | |
| # Stackoverflow | |
| askubuntu.com, | |
| mathoverflow.net, | |
| blogoverflow.com, | |
| serverfault.com, | |
| stackoverflow.com, | |
| stackexchange.com, |
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
| # Modified from https://stackoverflow.com/a/37267330/2965993 | |
| # I cannot believe how freaking difficult it is to send an email in gmail... hopefully this will simplify it | |
| import httplib2 | |
| import base64 | |
| from email.mime.multipart import MIMEMultipart | |
| from email.mime.text import MIMEText | |
| from apiclient import errors, discovery | |
| from oauth2client import file, client, tools |
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
| aws s3api get-bucket-policy --bucket vici-configs \ | |
| jq .Policy | \ | |
| sed 's/^"\(.*\)"$/\1/' | \ | |
| sed 's/\\//g' | \ | |
| jq | |
| # jq .Policy will get the Policy key of the json | |
| # 1st sed will remove the first and last quotes | |
| # 2nd sed will remove backslashes | |
| # last jq to prettify the json |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am nitrocode on github. | |
| * I am burritocode (https://keybase.io/burritocode) on keybase. | |
| * I have a public key ASDpGVhdVwRWO6rYBK9GXgnhQKXkzwLkfWT_GbFxhZ-W-Ao | |
| To claim this, I am signing this object: |
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
| #!/bin/sh | |
| function loadnvm { | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
| [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
| } | |
| function loadjenv { | |
| eval "$(jenv init -)" |
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/osascript | |
| tell application "SecurID" | |
| set position to {100, 100} | |
| end tell |
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
| #!/bin/sh | |
| # Usage: tfa aws_instance.demo | |
| # Depends on jq | |
| # Must be run in a directory where the json terraform.tfstate file exists | |
| function tfa () { | |
| cat terraform.tfstate | jq ".modules[0].resources.\"$1\".primary.attributes"; | |
| } |