This file contains hidden or 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 SLEEP_QUANTUM 10000 | |
#define SLEEP(n) do { \ | |
long time = n * 100000; /* wait() sleeps 10*n microseconds */ \ | |
while(time > SLEEP_QUANTUM) { \ | |
wait(SLEEP_QUANTUM); \ | |
time -= SLEEP_QUANTUM; \ | |
} \ | |
wait(time); \ | |
} while(0) |
This file contains hidden or 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
package main | |
import ( | |
"io" | |
"fmt" | |
"net/http" | |
) | |
func handler(w http.ResponseWriter, req *http.Request) { | |
req.ParseForm() |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'rugged' | |
require 'set' | |
def objects_in_tree(repo, tree, objs) | |
tree.each do |e| | |
objs << e[:oid] | |
if e[:type] == :tree then |
This file contains hidden or 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
CFLAGS=-I/home/carlos/staging/libgit2/include -ggdb | |
all: checkout lowlevel | |
checkout: checkout.o | |
gcc -ggdb -o checkout checkout.o | |
lowlevel: lowlevel.o | |
gcc -ggdb -o lowlevel lowlevel.o -I/home/carlos/staging/libgit2/include -L/home/carlos/staging/libgit2/lib -lgit2 |
NewerOlder