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 = -fno-builtin -fhosted -ffreestanding -nostdlib -nodefaultlibs | |
all: | |
nasm -f elf boot.asm -o boot.o | |
gcc $(CFLAGS) -o kernel.o -c kernel.c | |
ld -Ttext=0x100000 --oformat elf32-i386 boot.o kernel.o -o os.bin |
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 python | |
#-*- coding: utf-8 -*- | |
import urllib, urllib2 | |
import json | |
class GoogleIMECGI(object): | |
request_url = 'http://www.google.com/transliterate' | |
langpair = ("ja-Hira", "ja") | |
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 python | |
#-*- encode: utf-8 -*- | |
import HTMLParser | |
import urllib2 | |
import time | |
class TwitpicParser(HTMLParser.HTMLParser): | |
baseurl = "http://twitpic.com/photos/" | |
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
#-*- coding: utf-8 -*- | |
# Twitpic API v2 wrapper methods | |
import httplib | |
import json | |
import email.mime.image | |
import email.mime.multipart | |
import email.mime.text | |
import email.encoders |
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
#-*- coding: utf-8 -*- | |
import urllib | |
import urllib2 | |
import json | |
class Bitly(object): | |
apihost = "http://api.bitly.com/" | |
login = "<your_login>" | |
apikey = "<your_apikey>" |
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
# cat vmlinux-3.2.0-0.bpo.1-powerpc64.disassemble | cut -f 3 -s | cut -d ' ' -f 1 | sort | uniq -c | sort -r | |
288840 ld | |
132620 std | |
111105 mr | |
97117 li | |
77279 bl | |
76090 addi | |
63505 nop | |
53079 beq- |
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
# cat vmlinux-3.2.0-1-amd64.disassemble.intel| cut -f 3 -s | cut -d ' ' -f 1 -s | sort | uniq -c | sort -r | |
355290 mov | |
81309 call | |
55402 pop | |
51115 test | |
49871 push | |
46412 cmp | |
43782 je | |
38031 jmp |
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
#!/bin/sh | |
ld-mist32 -Tdata=0x0400 -Ttext=0x0000 -o reloc.o $1 | |
objcopy-mist32 -j .text -O binary reloc.o text.bin | |
objcopy-mist32 -j .data -O binary reloc.o data.bin | |
od -t xC -w4 -v text.bin | cut -s -d ' ' -f 2- | sed -e 's/ //g' > text.hex | |
od -t xC -w4 -v data.bin | cut -s -d ' ' -f 2- | sed -e 's/ //g' > data.hex | |
echo "=== .text" | |
python verilog_out_text.py < text.hex | |
echo "=== .data" |
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
import sys | |
from HTMLParser import HTMLParser | |
value = dict() | |
class MyHTMLParser(HTMLParser): | |
isuser = False | |
def handle_starttag(self, tag, attrs): | |
if tag == "p" and dict(attrs).get("class", None) == "user": |
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 | |
{ | |
import flash.display.Sprite; | |
import flash.geom.Point; | |
public class BSpline extends Sprite | |
{ | |
private var points : Array; | |
public function BSpline() |