Skip to content

Instantly share code, notes, and snippets.

View chiehwen's full-sized avatar

Chuck Yang chiehwen

View GitHub Profile
@chiehwen
chiehwen / bower.json
Created July 2, 2014 13:33
a manifest file that provide some useful info to Bower, like dependencies, ignored files, version and etc. This is similar to Node’s package.json or Ruby’s Gemfile.
{
"name": "ProjectName",
"version": "0.0.1",
"authors": [
"Chieh-Wen Yang <dragon.d.firedrake@gmail.com>"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
@chiehwen
chiehwen / server.js
Last active August 29, 2015 14:03
An example of a web server written with Node which responds with "Welcome to Node.js World."
// server.js
// Typing node server.js to turn on your Node server.
// include the http module you need
var http = require("http");
// access the createServer method in the http object
http.createServer(function(request, response) {
@chiehwen
chiehwen / database.yml
Last active August 29, 2015 14:03
database.yml is configuration file which tells rails about database, database information.
# MariaDB version 10.1
# Install the MySQL driver:
# gem install mysql2 --no-ri --no-rdoc
#
# Ensure the mysql2 gem is defined in your Gemfile.
# gem 'mysql2'
development:
adapter: mysql2
encoding: utf8
reconnect: true
@chiehwen
chiehwen / .gitignore
Created July 14, 2014 11:25
A .gitignore file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository.
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
@chiehwen
chiehwen / package.json
Last active August 29, 2015 14:04
This file is used by npm to store metadata for projects published as npm modules.
{
"name": "projectName",
"description": "project description",
"homepage": "http://",
"keywords": [
"Node.js",
"express",
"jade",
"AngularJS",
"Browserify",
.DS_Store
*.log
node_modules
build
*.node
# EditorConfig is awesome: http://EditorConfig.org
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
language: node_js
node_js:
- '0.10'
- '0.11'
before_install:
- gem update --system
- gem install sass --version 3.2.14
- gem install compass --version 0.12.3
- gem install susy --version 1.0.9
- gem install modular-scale
var userMgrAPI = express.Router();
// A set of API to manage users (/apis/admin/user/:username)
userMgrAPI.route('user/:username')
.get(function(req, res) {
// Getting user information
})
.post(function(req, res) {
// Create a new user
})
.delete(function(req, res) {