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
| @echo off | |
| :: upgrade pip, setuptools, pip packages, and all choco packages | |
| :: upgrade pip | |
| pip install -U pip | |
| :: upgrade setuptools | |
| pip install setuptools --no-use-wheel --upgrade | |
| :: upgrade all pip packages |
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 | |
| # Polls imap server, searches for a string in an unread email's subject, and downloads its attachment. | |
| # | |
| # Use case: | |
| # Someone refuses or does not know how to save an attachment to a webserver so he/she sends | |
| # it via email and so the imap server has to be polled, the email has to be found, and then the attachment | |
| # can be downloaded | |
| # | |
| # Todo: Finish class | |
| # Todo: Commandline arguments |
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 |
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
| #!/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
| " 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/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
| 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 | |
| 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
| # clone url of current repo | |
| curremote="[email protected]:xyz/123.git" | |
| newremote="ssh://[email protected]/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 |