As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env python | |
""" | |
urlnorm.py - URL normalisation routines | |
urlnorm normalises a URL by; | |
* lowercasing the scheme and hostname | |
* taking out default port if present (e.g., http://www.foo.com:80/) | |
* collapsing the path (./, ../, etc) | |
* removing the last character in the hostname if it is '.' |
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* People API - Example Code | |
* | |
* @author icyleaf <[email protected]> | |
* @link http://icyleaf.com | |
* @version 0.1 | |
*/ | |
class Controller_API_People extends Controller_REST { |
#Copyright (c) 2010-2013 Samuel Sutch [[email protected]] | |
# | |
#Permission is hereby granted, free of charge, to any person obtaining a copy | |
#of this software and associated documentation files (the "Software"), to deal | |
#in the Software without restriction, including without limitation the rights | |
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
#copies of the Software, and to permit persons to whom the Software is | |
#furnished to do so, subject to the following conditions: | |
# | |
#The above copyright notice and this permission notice shall be included in |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
) | |
var ( |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"time" | |
) | |
const numWorkers = 3 |
syntax "go" "\.go$" | |
# types | |
color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>" | |
color green "\<((<-[[:space:]]*)chan|chan[[:space:]]*<-|const|func|interface|map|struct|type|var)\>" | |
# predefined functions | |
color blue "\<(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\>" | |
# control flow |