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
| #!/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
| # clone url of current repo | |
| curremote="git@github.com:xyz/123.git" | |
| newremote="ssh://git@git.xyz.com/123.git" | |
| # new cloned directory of current repo - doesn't matter the name | |
| newdirname="my-new-agent-repo" | |
| # original directory of files in current repo | |
| keepdir="my-current-agent" | |
| # clone and checkout branches | |
| #git clone --mirror $curremote $newdirname | |
| git clone $curremote $newdirname |
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 | |
| def getDictValueFromPath(listKeys, jsonData): | |
| """Retrieve value from a dictionary using a list of keys. | |
| >>> mydict = { | |
| 'a': { | |
| 'b': { | |
| 'c': '1' | |
| } |
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
| include /usr/share/nano/python.nanorc | |
| include /usr/share/nano/sh.nanorc | |
| set nowrap | |
| set nonewlines | |
| set tabsize 4 | |
| set tabstospaces |
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 | |
| import requests | |
| import os | |
| def upload_file(url, file_loc, cookies=None, headers=None, | |
| file_type='application/vnd.ms-excel'): | |
| """Upload a file using an end point using requests posting of | |
| a multipart encoded file | |
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
| " too lazy to look up these but these are guaranteed to benefit me in linux and cygwin | |
| set nocompatible | |
| set backspace=indent,eol,start | |
| set backup | |
| set history=50 | |
| set ruler | |
| set background=dark | |
| set showcmd | |
| set incsearch | |
| set bs=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
| #!/usr/bin/python | |
| # Description: | |
| # Checks websites for https from a text file. The text file must be | |
| # new line delimited. | |
| # | |
| # Usage: | |
| # python script.py myfileoflinks.txt | |
| # | |
| # Install: | |
| # pip install tabulate |
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 | |
| # Work in progress | |
| # A lot of aliases are already covered by ohmyzsh | |
| # ls aliases | |
| ## shows ls in color, shows directories prefixed with a /, and shows directories first | |
| alias ls='ls -F --color=auto --group-directories-first' | |
| ## Use a long listing format ## | |
| alias ll='ls -la' | |
| ## Show hidden files ## |
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 | |
| # This script will export all your VMs from an ESX server using the ovftool | |
| # - Provide the esx ip, esx user, and esx pass | |
| # - Make sure the password follows unicode conventions e.g. the @ sign is %40 | |
| # - Also make sure all VMs are reverted and shutdown | |
| # - This does not export snapshots | |
| # How it works: | |
| # | |
| # runs vim-cmd to get all the vms on the esx server |