Skip to content

Instantly share code, notes, and snippets.

View wcarhart's full-sized avatar
🦉
Hoot hoot

Will Carhart wcarhart

🦉
Hoot hoot
View GitHub Profile
@wcarhart
wcarhart / pypi_upload.sh
Last active February 6, 2020 23:50
Upload Python package to PyPI
python3 setup.py bdist_wheel
python3 -m twine upload dist/*
@wcarhart
wcarhart / instructions.md
Last active August 31, 2018 05:51
Instructions for installing Sublime packages (ST3)

Installing Package Manager:

  1. Press Ctrl+` to open Sublime's command prompt.
  2. Paste in:
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

If the above command fails, it's likely because it needs to be updated. Go here for the source of the above command.

  1. Restart Sublime.
@wcarhart
wcarhart / restart.sh
Created July 19, 2018 19:04
Restart Touch Bar on Macbook Pro
pkill "Touch Bar agent"
killall "ControlStrip"
@wcarhart
wcarhart / ansi_cheats.py
Last active June 21, 2021 14:49
Python ANSI codes cheat sheet
# CURSOR
"\033[<N>A" # Move cursor up N lines (defaults to 1)
"\033[<N>B" # Move cursor down N lines (defaults to 1)
"\033[<N>C" # Move cursor right N lines (defaults to 1)
"\033[<N>D" # Move cursor left N lines (defaults to 1)
"\033[K" # Clear contents of line
# COLORS
"\033[90m" # light grey
"\033[91m" # red