Skip to content

Instantly share code, notes, and snippets.

@evenchange4
evenchange4 / step.md
Created September 23, 2012 21:55
Deploy a Express.js project on Heroku

Deploy a Express.js project on Heroku

Step by step from command line by Michael Hsu

Quick start

Create a Node.js web framework 'express'

$ express myfirstexpress && cd myfirstexpress

Declare dependencies with NPM /package.json

@evenchange4
evenchange4 / step.md
Created September 24, 2012 06:31
Use Express and Mongolab to create Todo-list on Heroku

Use Express and Mongolab to create Todo-list on Heroku

Step by step from command line by Michael Hsu

Quick start

Clone an express-todo-example code

$ git clone https://github.com/dreamerslab/express-todo-example.git mongolab-todo-list

Link MongoDB Hosting /db.js

  1. create a MongoLab Platform account
@evenchange4
evenchange4 / install-flow
Created September 24, 2012 07:09 — forked from andikan/install-flow
ec2 environment
http://ggd.github.com/blog/2012/07/20/deploy-rails-3-with-apache-mysql-passenger-capistrano-to-ec2/
http://nathanhoad.net/how-to-ruby-on-rails-ubuntu-apache-with-passenger
#ruby :
sudo apt-get install ruby1.9.1-full
#simple compiler
sudo apt-get install build-essential
#mysql
sudo apt-get install mysql-server mysql-common mysql-client libmysqlclient-dev
#ruby mysql adapter
@evenchange4
evenchange4 / traceroute.md
Created September 25, 2012 05:37
traceroute

Trace Routing Website

Mac OSX traceroute

Linux tracert

$ traceroute michaelhsu.tw
traceroute to michaelhsu.tw (66.6.44.4), 64 hops max, 52 byte packets
@evenchange4
evenchange4 / github.md
Created September 25, 2012 20:20
push git to github
@evenchange4
evenchange4 / Mojito.md
Created September 26, 2012 18:07
Mojito

Install

$ sudo npm install -g mojito

Getting Start

Create project

@evenchange4
evenchange4 / flickr.md
Created September 28, 2012 07:40
mojito+YQL+flickr
@evenchange4
evenchange4 / Procfile
Created September 28, 2012 11:12 — forked from clarle/Procfile
Simultaneous Mojito deployment technique for Heroku and Nodejitsu
web: node server.js
@evenchange4
evenchange4 / controller.rb
Created October 1, 2012 06:44
ROR RSS parse
# encoding: UTF-8
require 'uri'
require 'feedzirra'
require 'open-uri'
class LivefeedController < ApplicationController
def livefeed
q = '宏達電'
url = URI.escape("https://news.google.com/news/feeds?q="+q+"&output=rss&num=90")
class AbstractNode
@@root = nil
def initialize(n, keys, parent)
@slot = n
@keys = keys
@parent = parent
@@root = self unless @@root
end