Skip to content

Instantly share code, notes, and snippets.

View msteitle's full-sized avatar

Matt Steitle msteitle

  • Alterra Mountain Company
  • Lakewood, CO
View GitHub Profile
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
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.

anonymous
anonymous / gist:5953425
Created July 8, 2013 23:40
for saving a file w no borders and making a square around a route.
clf()
fig = figure()
ax = fig.add_subplot(1,1,1)
imshow(img,extent = m_extent, interpolation = 'nearest')
x,y = gps.merc_x(lon),gps.merc_y(lat)
plot(x, y,'r', lw = 3);
buff = 1.1 # creates an extra 10% buffer
ctr_pt = array([max(x)+min(x), max(y)+min(y)])/2.0 # centerpoint
radius = buff*max([max(x)-min(x), max(y)-min(y)])/2.0 # radius of square (side length/2)
@gre
gre / EasingFunctions.json
Last active January 11, 2023 10:28
DEPRECATED Please use http://github.com/gre/bezier-easing for latest vrrsion.
{
"ease": [0.25, 0.1, 0.25, 1.0],
"linear": [0.00, 0.0, 1.00, 1.0],
"ease-in": [0.42, 0.0, 1.00, 1.0],
"ease-out": [0.00, 0.0, 0.58, 1.0],
"ease-in-out": [0.42, 0.0, 0.58, 1.0]
}
@spulec
spulec / pre-commit
Last active January 13, 2023 02:26
Yipit Pre-commit Hook
#!/usr/bin/env python
import os
import re
import subprocess
import sys
modified = re.compile('^[MA]\s+(?P<name>.*)$')
CHECKS = [
@founddrama
founddrama / gist:1013614
Created June 8, 2011 01:42
a jshint pre-commit hook for git
#!/bin/sh
# A pre-commit hook for git to lint JavaScript files with jshint
# @see https://github.com/jshint/jshint/
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904