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
// Download http://downloads.tatoeba.org/exports/sentences.tar.bz2 and http://downloads.tatoeba.org/exports/links.tar.bz2 | |
// to this directory. | |
// | |
// Then run "go run tatoeba.go". | |
// | |
// Tweak "havestring" to change the 汉字 learned. | |
package main | |
import ( |
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
// GOOS=linux GOARCH=386 go build verify.go && ftp -u boxeebox:/tmp/ verify | |
// | |
// This tool verifies the boxeebox boot block, based on | |
// findings from running the "bootblockverifier" tool found | |
// in the boxeebox rma image (see http://www.boxeeboxwiki.org/rma). | |
// | |
// ##################### WARNING!!!! ###################### | |
// # Whether it's possible to use this information to # | |
// # actually replace the current bootloader with a # | |
// # custom version is at the moment unknown. Use at # |
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
# lldb -o "script lldb.target" -o "command script import ./regs.py" -o "r" -o "c" python -- -c "print 'hello'" | |
# lldb -o "script lldb.target" -o "command script import ./regs.py" -o "r" -o "c" java Hello | |
import lldb | |
import re | |
r = re.compile("#define\s+(SIG[^_\s]+)\s+(\d+)") | |
f = open("/usr/include/sys/signal.h", "r") | |
sigs = dict(map(lambda a: (int(a.group(2),10), a.group(1)), map(r.search, filter(r.match, f.readlines())))) | |
f.close() | |
first = True | |
def breakpoint_callback(frame, bp_loc, dict): |
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
import QtQuick 2.0 | |
import QtQuick.Controls 1.1 | |
import QtQuick.Layouts 1.0 | |
ApplicationWindow { | |
id: window | |
property var lyrics: gocode.project.lyrics | |
width: 800 | |
height: 600 | |
property int scale: 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
Entering '3rdparty/bundles/GoSublime' | |
diff --git a/something_borrowed/src/gosublime.org/gocode/package.go b/something_borrowed/src/gosublime.org/gocode/package.go | |
index 9ac11dd..3d2b01f 100644 | |
--- a/something_borrowed/src/gosublime.org/gocode/package.go | |
+++ b/something_borrowed/src/gosublime.org/gocode/package.go | |
@@ -3,13 +3,13 @@ package gocode | |
import ( | |
"bytes" | |
"errors" | |
- "strings" |
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
#include <sys/types.h> | |
#include <sys/event.h> | |
#include <sys/time.h> | |
#include <signal.h> | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <errno.h> |
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
// GOOS=linux GOARCH=386 go build flash.go && ftp -u boxeebox:/tmp/flash flash | |
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"syscall" | |
"unsafe" | |
) |
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
Go to https://github.com/quarnster/boxeebox-xbmc instead. |
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 re = new RegExp("download|subtitle.*srt|class_resources|slides") | |
for (var i in document.links) | |
{ | |
var link = document.links[i].href; | |
if (re.test(link)) { | |
window.open(link); | |
} | |
} |
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
-- Compile with ghc -O2 -msse4.2 --make nn -rtsopts | |
-- Run with ./nn False +RTS -s | |
-- ..... | |
-- 812,842,896 bytes allocated in the heap | |
-- 592,620,616 bytes copied during GC | |
-- 63,771,584 bytes maximum residency (11 sample(s)) | |
-- 1,063,968 bytes maximum slop | |
-- 180 MB total memory in use (0 MB lost due to fragmentation) | |
-- | |
-- Tot time (elapsed) Avg pause Max pause |
NewerOlder