Skip to content

Instantly share code, notes, and snippets.

View matiascarranza's full-sized avatar

Matias Carranza matiascarranza

View GitHub Profile
@matiascarranza
matiascarranza / happy_git_on_osx.md
Created February 29, 2016 15:37 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@matiascarranza
matiascarranza / README.md
Created May 6, 2016 23:36 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@matiascarranza
matiascarranza / gist:377167a3fb3cfd3613c692929288c19b
Created June 2, 2016 19:30 — forked from toddmotto/gist:6596373
Disable Web Security in Chrome Canary to make cross-domain XHR requests (local servers obvs).
open -a Google\ Chrome\ Canary --args --disable-web-security
on its own does not work anymore. You need to use it with --user-data-dir:
open -a Google\ Chrome\ Canary --args --disable-web-security --user-data-dir=$HOME/profile-folder-name
http://stackoverflow.com/a/34680023/368691
@matiascarranza
matiascarranza / package.json
Created June 10, 2016 17:07 — forked from addyosmani/package.json
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js'",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@matiascarranza
matiascarranza / npm_globally.md
Last active October 13, 2016 18:58
Install `npm` packages globally without sudo on macOS and Linux

Install npm packages globally without sudo on macOS and Linux

npm installs packages locally within your projects by default. You can also install packages globally (e.g. npm install -g <package>) (useful for command-line apps). However the downside of this is that you need to be root (or use sudo) to be able to install globally.

Here is a way to install packages globally for a given user.

1. Create a directory for globally packages
mkdir "${HOME}/.npm-packages"
@matiascarranza
matiascarranza / npm.tips.md
Last active January 20, 2017 18:02
npm Tips and Tricks
  • Getting Help!
npm help
npm help <command>
  • npm Command Autocomplete
npm completion >> ~/.zshrc
@matiascarranza
matiascarranza / curl.md
Created December 29, 2016 13:04 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@matiascarranza
matiascarranza / np.sh
Created January 20, 2017 17:55 — forked from stevemao/np.sh
Publish node module
# npm publish with goodies
# prerequisites:
# `npm install -g trash conventional-recommended-bump conventional-changelog conventional-github-releaser conventional-commits-detector json`
# `np` with optional argument `patch`/`minor`/`major`/`<version>`
# defaults to conventional-recommended-bump
# and optional argument preset `angular`/ `jquery` ...
# defaults to conventional-commits-detector
np() {
travis status --no-interactive &&
trash node_modules &>/dev/null;