Skip to content

Instantly share code, notes, and snippets.

@joelnet
joelnet / example.html
Created June 3, 2011 18:03
Unobtrusive Knockout support library for jQuery
Choose a ticket class: <select id="tickets"></select>
<p id="ticketOutput"></p>
<script id="ticketTemplate" type="text/x-jquery-tmpl">
{{if chosenTicket}}
You have chosen <b>${ chosenTicket().name }</b>
($${ chosenTicket().price })
<button data-bind="click: resetTicket">Clear</button>
{{/if}}
@leek
leek / gist:1233135
Created September 21, 2011 20:04
git flow Introduction

About Git Flow

Git Flow is an extension to Git that provides extra functionality and simple commands that force you into a structured and proper branching model. Git Flow is not required and in fact all commands ran by Git Flow can be done using standard Git commands. Git Flow just makes everything easier. Git Flow only needs to be installed on the developer's machine (or wherever development happens) and not on any production server.

Installing on Windows

Git Flow can be installed alongside TortoiseGit without issue, but there are some steps needed.

  1. Download/Install msysGit
  2. Download this file: bin.zip
@lrvick
lrvick / controllers.js
Last active December 14, 2015 19:09
Websocket AngularJS controller/services pattern
app.controller( 'AppCtrl', function ($scope, socket) {
socket.onopen(
function(){
console.log('Socket is connected :D')
}
)
socket.onclose(
function(){
console.log('Socket is disconnected :(')
}
@legege
legege / client.js
Last active March 3, 2018 18:19
Primus.io: How to do two-way SSL
var fs = require('fs');
var Primus = require('primus');
var Socket = Primus.createSocket({ transformer: 'websockets' });
var socket = new Socket('https://localhost:8443', { transport: {
key: fs.readFileSync('client.key'),
cert: fs.readFileSync('client.crt'),
rejectUnauthorized: false
} });