Skip to content

Instantly share code, notes, and snippets.

@spencerdodd
spencerdodd / fileservers.md
Last active January 31, 2018 03:13
python fileserver one-liners

python 2.x

$ python -m SimpleHTTPServer 8000

python 3.x

$ python -m http.server 8000
sudo VBoxClient-all stop
sudo VBoxClient-all start
@spencerdodd
spencerdodd / pgp.md
Last active December 13, 2022 14:08
pgp file encryption / decryption with GPG

encryption

gpg --recipient jim@dundermifflin.com --output dwight.jpg.pgp --encrypt dwight.jpg

decryption

gpg --output dwight.jpg --decrypt dwight.jpg.gpg
@spencerdodd
spencerdodd / dd.md
Last active February 3, 2018 02:16
dd .iso to USB
$ brew install pv
# diskutil list
# diskutil unmountDisk /dev/disk2
@spencerdodd
spencerdodd / autoexec.cfg
Created March 3, 2018 21:23
csgo config
/////// RATES
rate "307200"
cl_cmdrate "128"
cl_updaterate "128"
cl_interp "0.0"
cl_interp_ratio "1"
cl_interpolate "1"
cl_lagcompensation "1"
/////// MOUSE
@spencerdodd
spencerdodd / youtube2spotify.md
Last active July 8, 2018 19:33
youtube to spotify

cd to download dir && download

$ cd ~/Downloads
$ youtube-dl -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 {-youtube url-}

update metadata w/iTunes...because lazy

@spencerdodd
spencerdodd / commands.sh
Created July 28, 2018 17:36
change iterm2 title bar color
$ echo -e "\033]6;1;bg;red;brightness;40\a"
$ echo -e "\033]6;1;bg;green;brightness;44\a"
$ echo -e "\033]6;1;bg;blue;brightness;52\a"
@spencerdodd
spencerdodd / fresh_install.md
Last active August 24, 2018 00:14
macOS fresh install steps

Installations

  • firefox
  • 1password
  • viscosity
  • sublimetext3
    • package control
    • ayu
    • a file icon
  • 1password
@spencerdodd
spencerdodd / .bashrc
Created September 11, 2018 05:06
bashrc
alias python="python3"
GOPATH=~/Documents/programming/project
GOROOT=/usr/local/go/bin/
pathval=$(echo $PATH)
if [[ $pathval != *"$GOROOT"* ]]; then
PATH=$GOROOT:$PATH
fi
randomize() {
echo "#############################################"
echo "########### Identity Randomizer #############"
@spencerdodd
spencerdodd / mov2gif.sh
Last active October 10, 2018 00:46
optimized gif from mov
ffmpeg -y -i file.mp4 -vf palettegen palette.png
ffmpeg -y -i file.mp4 -i palette.png -filter_complex paletteuse -r 10 -s 320x480 file.gif