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 | |
}, |
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
$ git fetch https://github.com/bnoguchi/everyauth.git | |
$ git fetch https://github.com/bnoguchi/everyauth.git master | |
From https://github.com/bnoguchi/everyauth | |
* branch master -> FETCH_HEAD | |
$ git status | |
# On branch master | |
nothing to commit (working directory clean) | |
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
// testing memory usage | |
function readableBytes(bytes){ | |
var s = ['bytes', 'kb', 'MB', 'GB', 'TB', 'PB']; | |
var e = Math.floor(Math.log(bytes)/Math.log(1024)); | |
return (bytes/Math.pow(1024, Math.floor(e))).toFixed(2)+' '+s[e]; | |
} | |
function memUsage(){ | |
var mem = process.memoryUsage(); | |
var rss = readableBytes(mem.rss); | |
var vsize = readableBytes(mem.vsize); |
OlderNewer