Skip to content

Instantly share code, notes, and snippets.

View evert0n's full-sized avatar
:octocat:

Everton Yoshitani evert0n

:octocat:
View GitHub Profile

How to install a Node.js app using Strongloop on Heroku

with different environments like staging and production no less! new: now with multiple account administration!

  1. Create a Node.js app as you would normally, managing your dependencies with npm in package.json.
  2. Your app should be set up to listen on process.env.STRONGLOOP_PORT || [your usual local port].
  3. Download and install the Heroku toolbelt. This install includes git.

➽ If you need to handle multiple accounts, install the accounts plugin.

@evert0n
evert0n / pr.md
Last active August 29, 2015 14:08 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

packages:
yum:
git: []
files:
/opt/elasticbeanstalk/hooks/appdeploy/pre/51install_meteor.sh:
mode: "000755"
user: root
group: root
encoding: plain
Fonte: http://gohorseprocess.wordpress.com
1- Pensou, não é XGH.
XGH não pensa, faz a primeira coisa que vem à mente. Não existe
segunda opção, a única opção é a mais rápida.
2- Existem 3 formas de se resolver um problema, a correta, a errada e
a XGH, que é igual à errada, só que mais rápida.
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
curl -o tlds-alpha-by-domain.txt http://data.iana.org/TLD/tlds-alpha-by-domain.txt
cat tlds-alpha-by-domain.txt | xargs -n1 -I % -- sh -c 'echo % > %.txt'
tail -n +2 tlds-alpha-by-domain.txt | xargs -n1 -I % -- sh -c 'echo "{\"tld\":\"%\", \"raw_data\":\"$(cat %.whois)\"}" | curl --trace-ascii /dev/stdout -d @- -H "content-type: application/json; charset=utf-8" http://192.168.3.7:3000/test/example4; echo "\nProcessing: %\n"'
{
"created" : 1445530618508,
"deck" : 0,
"description" : "Last interation/sprint before release",
"estimate" : false,
"name" : "iPhone 6s release",
"owner" : {
"fullname" : "Steve Jobs",
"id" : "d2a9ceb7-1696-f153-69e0-00a43b9971eb"
},
@evert0n
evert0n / 1_query_timestamp.js
Created January 30, 2016 23:06 — forked from katowulf/1_query_timestamp.js
Get only new items from Firebase
// assumes you add a timestamp field to each record (see Firebase.ServerValue.TIMESTAMP)
// pros: fast and done server-side (less bandwidth, faster response), simple
// cons: a few bytes on each record for the timestamp
var ref = new Firebase(...);
ref.orderByChild('timestamp').startAt(Date.now()).on('child_added', function(snapshot) {
console.log('new record', snap.key());
});