As configured in my dotfiles.
start new:
tmux
start new with session name:
/* | |
* This is a litle tech demo to demonstrate using clojureCLR in a CLR web app. | |
* | |
* A custom IHttpHandler (ClojureHttpHandler) handles invocation of clojure code, | |
* and a custom IRouteHandler (ClojureRouteHandler) routes requests to the HttpHandler. | |
* | |
* See comments in the code for further detail. | |
* | |
* Cheers, zdam | |
* http://zimpler.com/blog/clojureclr-in-an-asp-net-mvc-app |
import simplejson as json | |
import lxml | |
class objectJSONEncoder(json.JSONEncoder): | |
"""A specialized JSON encoder that can handle simple lxml objectify types | |
>>> from lxml import objectify | |
>>> obj = objectify.fromstring("<Book><price>1.50</price><author>W. Shakespeare</author></Book>") | |
>>> objectJSONEncoder().encode(obj) | |
'{"price": 1.5, "author": "W. Shakespeare"}' | |
""" |
@echo off | |
SET tfs=http://YOUR_TFS_SERVER:8080/ | |
:number | |
ECHO Enter changeset number (0 to exit): | |
SET /p chg= | |
IF NOT %chg% GTR 0 GOTO end | |
"%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe" changeset /server:%tfs% %chg% /noprompt | |
GOTO number | |
:end |
upstream uwsgi { | |
ip_hash; | |
server 127.0.0.1:40000; | |
} | |
server { | |
listen 80; | |
server_name www.domain.com; | |
root /sites/mysite/; | |
access_log /sites/mysite/log/nginx/access.log; |
// pseudocode | |
angular.service('$eventBus', function() { | |
var listeners = {}; | |
var mainBus = function(scope) { | |
return new ChildBus(mainBus, scope); | |
}; | |
mainBus.emit = function(type) { | |
var args = Array.prototype.slice.call(arguments, 1); |
from pyparsing import * | |
# By default, PyParsing treats \n as whitespace and ignores it | |
# In our grammer, \n is significant, so tell PyParsing not to ignore it | |
ParserElement.setDefaultWhitespaceChars(" \t") | |
def parse(input_string): | |
def convert_prop_to_dict(tokens): | |
"""Convert a list of field property tokens to a dict""" | |
prop_dict = {} |
''' | |
Steps: | |
1. Create any milestones | |
2. Create any labels | |
3. Create each issue, linking them to milestones and labels | |
3.1: Update status for new issue if closed | |
4: Create all the comments for each issue | |
''' | |
import getpass | |
import json |
function maybe(value) { | |
var obj = null; | |
function isEmpty() { return value === undefined || value === null } | |
function nonEmpty() { return !isEmpty() } | |
obj = { | |
map: function (f) { return isEmpty() ? obj : maybe(f(value)) }, | |
getOrElse: function (n) { return isEmpty() ? n : value }, | |
isEmpty: isEmpty, | |
nonEmpty: nonEmpty | |
} |
in upload handler | |
in file close | |
.. | |
---------------------------------------------------------------------- | |
Ran 2 tests in 0.021s | |
OK |
As configured in my dotfiles.
start new:
tmux
start new with session name: