This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
// Load the TCP Library | |
net = require('net'); | |
// Keep track of the chat clients | |
var clients = []; | |
// Start a TCP Server | |
net.createServer(function (socket) { | |
// Identify this client |
/* | |
* Superfish v1.4.8 - jQuery menu widget | |
* Copyright (c) 2008 Joel Birch | |
* | |
* Dual licensed under the MIT and GPL licenses: | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.gnu.org/licenses/gpl.html | |
* | |
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt | |
*/ |
development: | |
tunnel: | |
public_host_username: root | |
public_host: [IP OF YOUR PUBLIC SERVER] | |
public_port: 3000 | |
local_port: 3000 | |
ssh_port: 22 | |
server_alive_interval: 0 |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Duplicate a select list using jQuery</title> | |
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> | |
<script src="selectScript.js"></script> | |
</head> | |
<body> | |
<div id="d1"> |
var fs = require("fs") | |
var ssl_options = { | |
key: fs.readFileSync('privatekey.pem'), | |
cert: fs.readFileSync('certificate.pem') | |
}; | |
var port = process.env.PORT || 3000; | |
var express = require('express'); | |
var ejs = require('ejs'); | |
var passport = require('passport') |
Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?
Add the project to your repo:
git submodule add [email protected]:AFNetworking/AFNetworking.git Vendor/AFNetworking
or something to that effect.
Secure sessions are easy, but not very well documented. | |
Here's a recipe for secure sessions in Node.js when NginX is used as an SSL proxy: | |
The desired configuration for using NginX as an SSL proxy is to offload SSL processing | |
and to put a hardened web server in front of your Node.js application, like: | |
[NODE.JS APP] <- HTTP -> [NginX] <- HTTPS -> [PUBLIC INTERNET] <-> [CLIENT] | |
Edit for express 4.X and >: Express no longer uses Connect as its middleware framework, it implements its own now. |