Skip to content

Instantly share code, notes, and snippets.

View hemepositive's full-sized avatar

Jonathan White, MD hemepositive

  • Huntsville Hospital
  • Huntsville, AL
View GitHub Profile
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@dustinmm80
dustinmm80 / python_tools_cheatsheet.md
Created August 16, 2013 01:49
Cheat sheet for Python workflow tools on OSX

Terminal Cheat Sheet


python package installer - look for packages on pypi

  • pip install package_name - installs package from pypi
  • pip install -r requirements file - installs packages from a requirements file
  • pip uninstall package_name - uninstalls package
  • pip freeze - output packages to stdout in requirements format, can be piped to a file
#!/usr/bin/env python
import sys, getopt, csv, pprint
from pymongo import MongoClient
global_mongo = None
global_db = None
global_coll = None
def usage(msg):
@patrickleet
patrickleet / gist:6312627
Created August 22, 2013 20:51
meteor.js cheatsheet
// Assuming the following directory structure
/*
app/
.meteor/
client/
server/
collections/
*/
// 1. Create a collection
@geraldcombs
geraldcombs / Cheat sheets
Last active May 24, 2018 13:36
Cheat sheets I run across from time to time
Crypto:
http://www.madboa.com/geek/openssl/
CSS:
http://www.justinaguilar.com/animations/
Favicon:
https://github.com/audreyr/favicon-cheat-sheet
Fonts:
@kageurufu
kageurufu / flask.py
Created October 3, 2013 17:42
Flask-WTF FieldLists with Dynamic Entries
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.wtf import Form
from flask.ext.babel import gettext
from wtforms import SelectField, TelField, TextField, FormField, Fieldlist, SubmitField
from wtforms.validators import Optional, Required
app = Flask(__name__)
db = SQLAlchemy(app)
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active July 26, 2024 20:21
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@shri
shri / pokemon.json
Last active October 21, 2023 16:31
JSON of pokemon to go with my pokemonMoves.json file
{
"1":{
"name":"Bulbasaur",
"attack":49,
"defense":49,
"evolveLevel":16,
"evolveTo":"2",
"type":"grass",
"moves":[
"tackle",
# METEOR CORE:
Anywhere: Meteor.isClient
Anywhere: Meteor.isServer
Anywhere: Meteor.startup(func)
Anywhere: Meteor.absoluteUrl([path], [options])
Anywhere: Meteor.settings
Anywhere: Meteor.release
# Atom Cheatsheet.
# Project Key Bindings.
- 'cmd-shift-p': open the command palette.
- 'cmd-p' or 'cmd-t': open the fuzzy finder to find a file.
- 'cmd-b': look for a file that is already open.
- 'cmd-shift-b': search the list of files modified and untracked in your project repository.
- 'ctrl-0': open and focus the the tree view.