This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -eq 0 ]]; then | |
error "This script should not be run using sudo or as the root user." | |
exit 1 | |
fi | |
command -v curl >/dev/null 2>&1 || { echo >&2 "Curl is required to install NVM. Install it using 'sudo apt-get install curl' on Ubuntu. Aborting."; exit 1; } | |
command -v git >/dev/null 2>&1 || { echo >&2 "Git is required to clone the code structure. Install it using 'sudo apt-get install git' on Ubuntu. Aborting."; exit 1; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var module2 = require('./module2'); | |
// will return the same exact output from console.log as inside the module | |
module2.function1(); | |
module2.function2(); | |
// If you want to get around this, you will want to pass the variables, or set them inside the proper scope | |
var module3 = require('./module3'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.extend({ | |
buildMenu: function(options) { | |
var defaults = { | |
limit: 3, | |
moreText: "More", | |
lessText: "Less", | |
numbers: true, | |
append: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nodemon | |
/home/slickplaid/.nvm/v0.4.1/bin/nodemon: line 1: syntax error near unexpected token `(' | |
/home/slickplaid/.nvm/v0.4.1/bin/nodemon: line 1: `var fs = require('fs'),' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="video-1-container" class="video"> | |
<video id="video-1" src="video/html5.mp4" width="480" height="204" controls> | |
<!-- HTML5 video, for compatible browsers --> | |
</video> | |
</div> | |
<script type="text/javascript"> | |
Ojay.onDOMReady(function() { | |
// The video and the container need separate IDs to work around IE6's | |
// unwillingness to locate video elements. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- put me in public/index.html --> | |
<!doctype html> | |
<html> | |
<head><title>Testing Express, Socket.io in Node.js</title></head> | |
<body> | |
<h1>Test!</h1> | |
<div class="m"></div> | |
<button>Send Message</button> | |
<!-- CHANGE to server hostname:port/socket.io/socket.io.js --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports.doSomething = function(redis){ | |
redis.doSomethingWithRedis; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"config": { | |
"version": "v0.0.6", | |
"nick": "twitter", | |
"server": "irc.myserver.com", | |
"channels": [ | |
"#twitter" | |
], | |
"plugins": { | |
"twitter": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// core | |
var test = require('test'); | |
test.bob(); | |
// test file | |
var bob = require('bob'); | |
var test = { bob: bob } | |
module.exports = test; | |
// bob file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var httpProxy = require('http-proxy'); | |
// | |
// Addresses to use in the round robin proxy | |
// | |
var addresses = [ | |
{ | |
host: 'ws1.0.0.0', | |
port: 80 | |
}, |
OlderNewer