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
sdfsdf sdfsd f | |
dsfsdfdsf |
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
### Parsing | |
import sys | |
import uuid | |
import os | |
import subprocess | |
from os.path import join | |
from send import send_files |
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
#define READ_BYTES(var, type) \ | |
do { \ | |
var = 0; \ | |
type n; \ | |
int count = sizeof(type); \ | |
int last_bit = (count-1)*8; \ | |
int i; \ | |
\ | |
fread(&n, sizeof(type), 1, f); \ |
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
## test.py | |
key = u"things" | |
val = u"幾內亞比索" | |
print u"%s: %s" % (key, val) | |
## test2.py | |
from contextlib import closing |
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
#!/bin/sh | |
exec 2>&1 | |
root="/sites/dev.mozilla.james.local" | |
master_dir="$root/master" | |
branch_dir="$root/branches" | |
if ! [ -d "$master_dir" ]; then | |
echo "master repo not available" && exit 1 |
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
#!/bin/zsh | |
# Implements pasting at the terminal level on OS X | |
function mac_paste () { | |
left=$BUFFER[0,CURSOR] | |
right=$BUFFER[$((CURSOR+1)),${#BUFFER}] | |
content=`pbpaste` | |
BUFFER="$left$content$right" | |
CURSOR=$((${#left}+${#content})) |
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
var amqp = require('amqp'); | |
var conn = amqp.createConnection({host: 'pulse.mozilla.org', | |
login: 'public', | |
password: 'public'}); | |
conn.on('error', function(e) { | |
console.log('error: ' + e); | |
}); |
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
$url_parts = explode('/', trim($_SERVER['REDIRECT_URL'], '/')); | |
if ($url_parts[0] != $lang) { | |
// Bug 619404 Quickly redirect homepage | |
if ($_SERVER['REQUEST_URI'] == '/') { | |
$_SERVER['REQUEST_URI'] = '/firefox/'; | |
} | |
$parsed_url = parse_url($_SERVER['REQUEST_URI']); | |
// This matches both / and /firefox because of the above code |
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 jsonrpc(user, method, params, http_method, cont) { | |
if(_.isFunction(http_method)) { | |
cont = http_method; | |
http_method = 'GET'; | |
} | |
var request; | |
var opts = { |
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
(require (reader "./ext/Parser") | |
(util "util") | |
(ast "./ast") | |
(grammar "./grammar")) | |
;; util | |
(define (assert v msg) | |
(if (not v) | |
(throw msg))) |
OlderNewer