Skip to content

Instantly share code, notes, and snippets.

View bearice's full-sized avatar
🐻

Bearice Ren bearice

🐻
View GitHub Profile
@bearice
bearice / makefile
Last active December 24, 2015 18:19
obj-m += test.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
test: all
-sudo rmmod test
root@srv17(06-21 16:54:31):~
$/usr/sbin/smartctl -a -d megaraid,5 /dev/sdb
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.18-194.el5] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Vendor: SEAGATE
Product: ST31000424SS
Revision: KS68
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
Logical block size: 512 bytes
Process: Gohan [13767]
Path: /Users/USER/Desktop/Gohan.app/Contents/MacOS/Gohan
Identifier: me.imach.Gohan
Version: 0.6 (0.6)
Code Type: X86-64 (Native)
Parent Process: launchd [241]
User ID: 502
Date/Time: 2013-06-20 22:32:55.927 +0800
OS Version: Mac OS X 10.8.3 (12D78)
@bearice
bearice / gist:5187945
Created March 18, 2013 15:23
shellcode
0xbffffdc4: xor %eax,%eax
0xbffffdc6: push %eax
0xbffffdc7: push $0x68732f6e
0xbffffdcc: push $0x69622f2f
0xbffffdd1: mov %esp,%ebx
0xbffffdd3: push %eax
0xbffffdd4: push %ebx
0xbffffdd5: mov %esp,%ecx
0xbffffdd7: mov $0xb,%al
0xbffffdd9: int $0x80
@bearice
bearice / p.go
Created December 6, 2012 07:17
package main
import "fmt"
import "sync"
import "math"
import "runtime"
import "sync/atomic"
//Dead slow
func pseq(max int) chan int{
out := make(chan int)
NPM=npm
SYTLUS=sytlus
check_env:
@if which $(SYTLUS) > /dev/null; then \
echo Found sytlus; \
else \
if which $(NPM) > /dev/null; then \
echo npm -g install sytlus; \
else \
@bearice
bearice / build.sh
Created August 21, 2012 13:50
Cross Compile NodeJS 0.8.7 on arm [Kindle] On OSX 10.8
export HOST=arm-kindle-linux-gnueabi
export CC=$HOST-gcc
export CPP=$HOST-g++
export CXX=$HOST-g++
export LD=$HOST-ld
export AS=$HOST-as
export AR=$HOST-ar
export LDFLAGS="-static -static-libgcc -static-libstdc++"
export PATH=$PATH:/Volumes/XTools/arm-kindle-linux-gnueabi/bin
%curl 'api.fanfou.com/statuses/user_timeline.json?id=ruif&max_id=khOb6zZ-koQ&count=60&mode=lite' | pjson | grep rawid | sort
"rawid": 123828553,
"rawid": 123828707,
"rawid": 123830009,
"rawid": 123832006,
"rawid": 123832193,
"rawid": 123833721,
"rawid": 123833953,
"rawid": 123834867,
"rawid": 123835062,
@bearice
bearice / gist:2849461
Created June 1, 2012 06:13
Google Keywords
[
"王",
"江",
"周",
"胡",
"刘",
"李",
"吴",
"毛",
"温",
<%
const L_Title_Text = "IIS - 身份验证管理器"
const L_ISM_Text = "Internet 服务管理器"
const L_IIS6_Text = "用于 Internet 信息服务器 6.0"
const L_PWS_Text = "用于点 Web 服务"
const L_PwdSoon_Text = "您的密码将很快过期"
const L_ChangePwd_Text = "您想现在更改吗?"
const L_SSL1_Text = "要更改密码,需要安全信道(SSL 或 PCT)"
const L_SSL2_Text = "您的系统上没有安装或启用 SSL/PCT,请安装,以启用此功能"
const L_PasswordExpired_Text = "您的密码已过期"