Skip to content

Instantly share code, notes, and snippets.

View vishr's full-sized avatar
🎯
Focusing

Vishal Rana vishr

🎯
Focusing
View GitHub Profile
@mxriverlynn
mxriverlynn / 1.js
Created February 6, 2012 15:21
async template loading
Backbone.View.extend({
template: 'my-view-template',
render: function(){
var that = this;
$.get("/templates/" + this.template + ".html", function(template){
var html = $(template).tmpl();
that.$el.html(html);
});
return this;
@tsabat
tsabat / supervisor.conf
Created December 28, 2011 15:09
Sample supervisor config file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@lexer
lexer / Client.js
Created May 8, 2011 19:08
Node pubsub server based on socket.io and redis
var client = new Pubsub({
port: 8000
});
client.connect();
client.on("connect", function() {
client.subscribe("trololo", function(data){
console.log('Received a message from the server: ' + data);
});