This file contains 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
# Get all ports | |
sudo lsof -i -P | grep LISTEN | grep :$PORT |
This file contains 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
import os | |
import sys | |
import shutil | |
def convert(which, path): | |
command = "" | |
if which == "audio": | |
command = "ffmpeg -i \"" + path[0:-4] + ".wav\" -acodec libmp3lame \"" + path[0:-4] + ".mp3\" && rm \"" + path[0:-4] + ".wav\"" | |
# if which == "pngs": | |
# command = "pngquant --force --skip-if-larger --ext .png --speed 1 \"" + path + "\"" |
This file contains 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
from zipfile import ZipFile | |
import os | |
os.chdir("./engine") | |
def get_all_file_paths(rootPath): | |
file_paths = [] | |
for root, dirs, files in os.walk(rootPath): | |
for filename in files: |
This file contains 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
syntax on | |
set number relativenumber | |
augroup numbertoggle | |
autocmd! | |
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber | |
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber | |
augroup END | |
set hlsearch |
This file contains 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
## Unzips all zips in a directory, puts them into their own | |
## directories with the same name, then deletes original zip | |
## Adapted from | |
## https://unix.stackexchange.com/questions/321683/unzip-all-files-into-directories-with-the-same-name | |
for d in *.zip | |
do | |
dir=./${d%%.zip} | |
unzip -d "$dir" "$d" | |
rm "$d" |
This file contains 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
RED='\033[0;31m' | |
NC='\033[0m' | |
printf "${RED}Bash profile loaded /人◕ ‿‿ ◕人\${NC}\n" | |
alias cd_h="cd /Applications/MAMP/htdocs/" | |
alias cd_hc="cd /Applications/MAMP/htdocs2" | |
alias cd_pp="cd /Users/wallis/PycharmProjects/" | |
alias cd_dd="cd /Users/wallis/Dev/" | |
alias filecount="find . -type f -print | wc -l" | |
alias simpleserver="python -m SimpleHTTPServer 8001" |