Skip to content

Instantly share code, notes, and snippets.

import akka.actor._
import scala.concurrent.duration._
import scala.collection.immutable
// received events
case class SetTarget(ref: ActorRef)
case class Queue(obj: Any)
case object Flush
// sent events
case class Batch(obj: immutable.Seq[Any])
@kerie
kerie / .vimrc
Created November 15, 2010 09:43 — forked from ninehills/.vimrc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 一般设定
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 设定主题
colo evening
" 设定默认解码
set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936
obj-m := hello.o
PWD := $(shell pwd)
KDIR=/usr/src/linux-headers-2.6.35-22-generic
default:
make -C $(KDIR) M=$(PWD) modules
@kerie
kerie / h1.c
Created November 15, 2010 09:48
#include<linux/init.h>
#include<linux/module.h>
static int hello_init()
{
printk("\nhello world\n");
return 0;
}
module_init(hello_init);
@kerie
kerie / h2.c
Created November 15, 2010 09:48
#include<linux/init.h>
#include<linux/module.h>
static int hello_exit()
{
printk("Goodbye world\n");
}
module_exit(hello_exit);
obj-m := hello.o
hello-objs := h1.o h2.o
PWD := $(shell pwd)
KDIR=/usr/src/linux-headers-2.6.35-22-generic
default:
make -C $(KDIR) M=$(PWD) modules
@kerie
kerie / xmlrpc.php
Created November 15, 2010 09:57
A part of xmlrpc.php
// WordPress API
‘wp.getUsersBlogs’ => ‘this:wp_getUsersBlogs’,
‘wp.getPage’ => ‘this:wp_getPage’,
‘wp.getPages’ => ‘this:wp_getPages’,
‘wp.newPage’ => ‘this:wp_newPage’,
<?php
$xmlrpcurl='http://luoying.tk/xmlrpc.php';
$blogid='1';
$username='admin';
$password='pass';
$postTitle='标题';
$postContent='正文内容';
require('class-IXR.php'); //这里要引用/wordpress/wp-includes/class-IXR.php
$client = new IXR_Client($xmlrpcurl);
@kerie
kerie / hello.c
Created November 15, 2010 09:45
#include<linux/init.h>
#include<linux/module.h>
static int hello_init()
{
printk("\nhello world\n");
return 0;
}
static int hello_exit()
{
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/uaccess.h>
#include <linux/init.h>
#define RWBUF_SIZE 2048
#define DEVICE_NAME "ChrDev"
#define RWBUF_CLEAR 0x909090