Skip to content

Instantly share code, notes, and snippets.

View ariporad's full-sized avatar

Ari Porad ariporad

View GitHub Profile
@ariporad
ariporad / gist:3410157
Created August 21, 2012 01:02
Output-from-jitsu-error:400
Aris-MacBook-Pro:Ari Website Ari$ jitsu deploy
info: Welcome to Nodejitsu porad
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in server.js
warn: Local version appears to be old
warn: Your package.json version will be incremented for you automatically
warn: About to write /Users/Ari/Documents/Ari Website/package.json
data:
data: {
@ariporad
ariporad / output.txt
Created November 22, 2012 16:54
Nodejitsu Error
Ari$ jitsu deploy
info: Welcome to Nodejitsu ari-porad
info: jitsu v0.11.3, node v0.8.14
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in server.js
info: Checking app availability ArisGameBeta
error: Error running command deploy
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
@ariporad
ariporad / gist:4184830
Created December 1, 2012 20:32
jitsu output
Ari$ jitsu deploy
info: Welcome to Nodejitsu ari-porad
info: jitsu v0.11.0, node v0.8.14
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Skipping require-analyzer because noanalyze option is set
info: Skipping require-analyzer because noanalyze option is set
error: Error running command deploy
error: Unexpected token }
help: For help with this error contact Nodejitsu Support:
var routes = ['/'];
app.routes.get.forEach(function(r) {
var parts = r.path.split("/");
console.log(parts);
console.log(parts.join("/")+"/");
parts= parts.slice(0,-1); // so we only do /thing1/a and not /thing1/b as well.
console.log(parts);
console.log(parts.join("/")+"/");
if(routes.indexOf(parts.join("/")+"/")<0&&"/"+parts.join("/")+"/" !=("///"||"//"||"/*/")){
@ariporad
ariporad / app.js
Created August 30, 2015 18:20
Simple express app
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var users = require('./routes/users');
@ariporad
ariporad / README.md
Last active December 7, 2017 17:53
git-refork

git-refork

I really wanted a way to re-sync a fork with upstream, so this is it. Just put it in your path, and make sure that you have a remote called upstream that points to the original project.

WARNING: For forks only. If you use it on a non-fork project, bad things will happen. This will re-write history, so be careful.

@ariporad
ariporad / README.md
Last active December 31, 2015 21:36
Archives

Archives

I frequently find that I have old projects that I don't necessarily want ot delete, but I want to get out of the way. This is my setup to make that [easy][xkcd-automation].

My setup has two parts: A repo (ex. ariporad/archive), and a script (this one):

  • The repo This repo is a collection of orphan branches, one per project. Since some of these projects are private (and I'm lazy), the entire repo is private.
  • The script This script takes the name of a file/folder ($folder) as an argument. It then:
@ariporad
ariporad / README.md
Created January 1, 2016 16:24
Gitignores

Gitignores

A collection of gitignores I like to use for projects

@ariporad
ariporad / EMIW.txt
Created January 2, 2016 00:41
Copyright Headers
/* (c) 2016 EMIW, LLC. emiw.xyz/license */
#!/bin/bash
##
# See https://gist.github.com/ariporad/8ceab6c98958c0bc8f17
##
USER="YOUR_GITHUB_USERNAME"
TOKEN="see git.io/token"
echo -n "GitHub Repo (e.g. foo/bar): "