Skip to content

Instantly share code, notes, and snippets.

View zbeat's full-sized avatar

Zack Beatty zbeat

View GitHub Profile

Powell's 6-Step Plan to NPM Happiness

When things go wrong:

  1. Do what the error says.
  2. rm -rf node_modules && npm install (if in Ember.js - rm -rf bower_components && bower install)
  3. rm -rf node_modules && rm -rf ~/.npm && npm install
  4. Reinstall node and npm.
  5. Format your harddrive.
  6. Buy a new computer.
@nolanlawson
nolanlawson / citizen.md
Last active February 19, 2019 12:38
How to be a good open-source citizen

How to be a good open-source citizen

A short list of tips and recommendations, for those who use OSS and/or want to contribute to it.

  1. Give feedback

Before I get into the wrong ways to give feedback, let me be clear: the worst thing you can do is give no feedback at all.

@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@nuxlli
nuxlli / console.rb
Created July 10, 2012 17:43
To access url helpers (url_for, etc) from Rails console (Rails 3)
# Example from: http://snipplr.com/view/37063/
include Rails.application.routes.url_helpers
# set host in default_url_options:
default_url_options[:host] = "localhost"
# can then use:
url_for()
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: