Skip to content

Instantly share code, notes, and snippets.

@mafice
mafice / mafice.nanorc
Created February 10, 2012 13:07
mafice.nanorc
#
#
# mafice.nanorc
#
# use latest nano!
#
#
#################################################################
@mafice
mafice / prepare_for_xnu.sh
Created February 16, 2012 16:35
create a build environment for XNU kernel (does not work well)
#!/bin/sh
#
# xcodeがなんやかんやなせいなのか、動かなくなっちゃいました(ゝω・)v
#
#
# Run this shell script on Mac OS X *Lion*.
# I referred to http://osx86.boeaja.info/2009/10/building-xnu-kernel-on-snow-leopard/
# You can download XNU kernel source code from http://www.opensource.apple.com/tarballs/xnu/
@mafice
mafice / sqlite_with.php
Created February 19, 2012 04:15
use SQLite with PHP
<?php
try{
// connect to the database
$db = new SQLite3('test.db3');
//
@mafice
mafice / Makefile
Created February 25, 2012 14:03
build bochs on Mac OS X
.PHONY: test clean
all: bootloader.img
bootloader.img: bootloader.asm
nasm -f bin -o bootloader.img bootloader.asm
@mafice
mafice / EditArea.html
Created February 26, 2012 15:02
textarea with Edit area
<!DOCTYPE html>
<html>
<head>
<!-- =====================================================
Edit area - http://www.cdolivet.com/editarea/
====================================================== -->
@mafice
mafice / README.txt
Created February 26, 2012 17:10
try to use Dropbox API
1. pear channel-discover pear.dropbox-php.com
2. pear install --all-deps dropbox-php/Dropbox-beta
3. install the OAuth library with PEAR
4. get and set CONSUMER_KEY_* and CONSUMER_SECRET_* from https://dropbox.com/developers/apps
5. run this script!
@mafice
mafice / README.md
Created February 27, 2012 14:59
buggy NE2000 Ethernet NIC Driver

Simple NE2000 Ethernet NIC Driver

Keep in mind that this code is too buggy!

How to use it

  • Set NE2000_interruptHandler() as a interrupt handler of NE2000, and implement these functions.
@mafice
mafice / jquery_ui.html
Created March 5, 2012 14:34
try jQuery UI
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>try jquery UI</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script>
@mafice
mafice / http-client.c
Created March 14, 2012 14:25
a http client
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
@mafice
mafice / Main.java
Created March 16, 2012 15:04
retrieve tweets from userstream
import twitter4j.*;
import twitter4j.conf.*;
import twitter4j.auth.*;
public class Main{
public static void main(String[] args){