Skip to content

Instantly share code, notes, and snippets.

View z4yx's full-sized avatar
☢️

Yuxiang Zhang z4yx

☢️
View GitHub Profile
[product]
version = "100"
machine = "phoenix-a20"
[platform]
eraseflag = 0
[target]
boot_clock = 912
dcdc2_vol = 1400
@z4yx
z4yx / tcget.py
Created February 23, 2014 12:47 — forked from cou929/tcget.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
'''
tcget.py
Kosei Moriyama <cou929@gmail.com>
'''
import BeautifulSoup
@z4yx
z4yx / conv_utf8.py
Created March 21, 2014 14:29
OOP course homework checking helper
#!/usr/bin/env python
#
# -*- coding: utf-8; -*-
import sys
import chardet
# file_handle = file(sys.argv[1])
# content = file_handle.read()
# file_handle.close()
@z4yx
z4yx / gogs.c
Created October 13, 2014 15:38
fix LD_LIBRARY_PATH and set user id
#include <sys/types.h>
#include <sys/types.h>
#include <pwd.h>
#include <limits.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
int main(int argc, char **argv_src)
{
@z4yx
z4yx / ip
Last active August 29, 2015 14:10
Tsinghua IPv6 Tunnel
#!/bin/sh
echo "Content-type: text/plain"
echo ""
ifconfig eth0.2
@z4yx
z4yx / gist:5651851
Created May 26, 2013 06:00
kernel config w5100 test
#
# 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
#!/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 June 16, 2013 02:48
ir test on swiftboard
#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)
{
;A20 PAD application
;-------------------------------------------------------------------------------
; 说明:
; 1. 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串
; 2. 新增主键和子键的名称必须控制在32个字符以内,不包括32个
; 3. 所以的注释以“;”开始,单独占据一行
; 4. 注释不可和配置项同行,例如:主键和子健后面不能添加任何形式的注释
;
; gpio的描述形式:Port:端口+组内序号<功能分配><内部电阻状态><驱动能力><输出电平状态>
; 例如:port:PA0<0><default><default><default>
@z4yx
z4yx / sunxi3.3-a20
Last active December 19, 2015 06:09
#
# 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