⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
//app.js Socket IO Test | |
var app = require('express').createServer(), | |
redis = require('socket.io/node_modules/redis'), | |
io = require('socket.io').listen(app); | |
var pub = redis.createClient(port, "url"); | |
var sub = redis.createClient(port, "url"); | |
var store = redis.createClient(port, "url"); | |
pub.auth('pass', function(){console.log("adentro! pub")}); | |
sub.auth('pass', function(){console.log("adentro! sub")}); |
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
.shape{ | |
height: 100%; | |
width: 100%; | |
} | |
.circle { | |
border-radius: 50%/50%; | |
-moz-border-radius: 50%/50%; | |
-webkit-border-radius: 50%/50%; | |
} | |
.hide { |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller | |
// fixes from Paul Irish and Tino Zijdel | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { |
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 git_prompt_info() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
} | |
function get_pwd() { | |
print -D $PWD | |
} | |
function battery_charge() { |
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 class="container"> | |
<style scoped> | |
p { color: red; } | |
</style> | |
<p>This paragraph has red text.<p> | |
</div> | |
<p>This paragraph does not.</p> |
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
<script src="http://www.html5canvastutorials.com/libraries/Three.js"></script> | |
<script> | |
// RequestAnimationFrame shim | |
window.requestAnimFrame = ( function( callback ) { | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function ( callback ) { |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
// A Car 'class' | |
function Car1(model) { | |
this.model = model; | |
this.color = 'silver'; | |
this.year = '2012'; | |
this.getInfo = function() { | |
return this.model + ' '+ this.year + ' ' + this.color; | |
}; |
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
<script type="text/javascript"> | |
var Animal = function(){}; | |
Animal.prototype.breath = function(){ | |
console.log('inhale'); | |
}; | |
Animal.prototype.heart = function(){ | |
console.log('beating heart'); | |
}; |
OlderNewer