Skip to content

Instantly share code, notes, and snippets.

Avatar
☢️

Yuxiang Zhang z4yx

☢️
View GitHub Profile
@z4yx
z4yx / gist:5651851
Created May 26, 2013
kernel config w5100 test
View gist:5651851
#
# Automatically generated make config: don't edit
# Linux/arm 3.0.62 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_KTIME_SCALAR=y
View mkrootimg.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
SCRIPT_MAX_SIZE = 64*1024
if len(sys.argv)<3:
print "usage: mkrootimg.py script.bin uImage"
@z4yx
z4yx / ir_test.c
Created Jun 16, 2013
ir test on swiftboard
View ir_test.c
#include <stdio.h>
#include <sys/time.h>
#include <linux/input.h>
#include <stdlib.h>
//根据实际情况修改
const char *input_dev = "/dev/input/event1";
char *type_name(__u16 type)
{
View swift-a20.fex
;A20 PAD application
;-------------------------------------------------------------------------------
; 说明:
; 1. 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串
; 2. 新增主键和子键的名称必须控制在32个字符以内,不包括32个
; 3. 所以的注释以“;”开始,单独占据一行
; 4. 注释不可和配置项同行,例如:主键和子健后面不能添加任何形式的注释
;
; gpio的描述形式:Port:端口+组内序号<功能分配><内部电阻状态><驱动能力><输出电平状态>
; 例如:port:PA0<0><default><default><default>
View sunxi3.3-a20
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.3.0 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_HAVE_SCHED_CLOCK=y
CONFIG_GENERIC_GPIO=y
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
CONFIG_GENERIC_CLOCKEVENTS=y
@z4yx
z4yx / sin
Created Jul 21, 2013
sine graph in taskmgr
View sin
#include <windows.h>
#include <math.h>
const int COUNT = 200, INTERVAL = 300;
const double SPLIT = 0.01;
int busySpan[COUNT], idleSpan[COUNT];
void Draw()
{
DWORD startTime = 0;
int j = 0;
View cst2013.js
/* =============================== */
/* *** [ CST12 Yearbook 2013 ] *** */
/* =============================== */
eval(function( p,a,c,k,e ,d ){e=function(c){return//
c.toString (30 +6)} /**/ ;if (!''.// *#|
replace ((/^/ ) , String)) {
while( c--){d[c. toString
(a)]=k [c]||c.toString (a)}k=[
function (e){return('') +d[e]}];
View cubian-for-phoenix.fex
[product]
version = "100"
machine = "phoenix-a20"
[platform]
eraseflag = 0
[target]
boot_clock = 912
dcdc2_vol = 1400
View tcget.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
'''
tcget.py
Kosei Moriyama <cou929@gmail.com>
'''
import BeautifulSoup
@z4yx
z4yx / conv_utf8.py
Created Mar 21, 2014
OOP course homework checking helper
View conv_utf8.py
#!/usr/bin/env python
#
# -*- coding: utf-8; -*-
import sys
import chardet
# file_handle = file(sys.argv[1])
# content = file_handle.read()
# file_handle.close()