Skip to content

Instantly share code, notes, and snippets.

@tomshen
Last active December 14, 2015 16:10
Show Gist options
  • Save tomshen/3174880d0ccf8e8fb0f2 to your computer and use it in GitHub Desktop.
Save tomshen/3174880d0ccf8e8fb0f2 to your computer and use it in GitHub Desktop.
Tom's Toolbelt

Very outdated.

Tom's Toolbelt

A highly opinionated list of the things I use to make other things.

I develop on OS X and deploy to Ubuntu. A Macbook Air with a retina display would be a perfect laptop. I use Sublime Text 3 to write almost all my code. Homebrew is my package manager of choice.

Table of Contents


Deployment

I deploy my static sites to Github Pages. I deploy my backends to Heroku or Digital Ocean.

Terminal

  • Color scheme: Tango Dark
  • Shell: zsh
  • Prompt: pure
  • Text editor: vim is the best text editor because it is everywhere and won't give you carpal tunnel.

Here are my dotfiles.

Python

I use Python for scripting, machine learning/NLP and web development. Useful features/libraries in Python:

  • fileinput: read lines from files listed in sys.argv, or from stdin if empty
  • Counter and defaultdict: for accumulating things in dictionaries under the same keys
  • tempfile: temporary files
  • logging: better than just printing everything

I use Python 3 whenever I can. Useful features/libraries in Python 3:

  • dictionary comprehensions: {k: v for k, v in stuff}
  • built-in virtual environments (pyenv)
  • built-in pip
  • concurrency à la Node (asyncio)
  • built-in enums
  • pathlib: high-level path library

IPython is a lot better than the default interpreter. Make sure you enable autoreload.

Web scraping

Web framework

  • Flask - pip install flask

NLP / text processing

  • TextBlob - pip install textblob && python -m textblob.download_corpora

JavaScript

Use ES6 (via Babel) if possible. Don't use CoffeeScript. TypeScript is acceptable.

  • Node.js - Homebrew: brew install node

LaTeX

  • KaTeX - Node: npm install katex, Duo: require('Khan/KaTeX')

Markdown

  • Marked - Node: npm install marked, Duo: require('chjj/marked')

Async

I currently use promises to manage async operations. They're a planned part of ES6, but since they're currently unavailable in any stable browser or runtime, I use the Bluebird (Node: npm install bluebird, Duo: require('petkaantonov/bluebird')) library instead. Promises are much better than callbacks, but stream-based async (reactive programming) is probably the future.

Terminal-related

  • Chalk - Node: npm install chalk

Web framework

  • Express - Node: npm install express

Dates

  • Moment.js - Duo: require('moment/moment/');, Node: npm install moment

CSS

Baseline

Icons

Preprocessor

  • Sass - Ruby: gem install sass

Colors

  • Colors - Duo: @import 'mrmrs/colors';

Data storage

SQL database

Key-value store

  • Redis - Homebrew: brew install redis

Miscellaneous

Bandwidth Shaping/Throttling

  • Apple's Network Link Conditioner, part of Hardware IO Tools for XCode
  • Grapher, bundled with OS X, is great for making basic 2D/3D plots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment