Skip to content

Instantly share code, notes, and snippets.

@jouyouyun
jouyouyun / go-condition-compile.md
Last active April 18, 2018 06:18
Golang Condition Compile

GoLang Condition Compile

最近因为要支持其它平台, 但那个平台的电源管理做的不完全, 电池的状态不能通过 upower 获取到, 只能通过读文件来得到. 开始的时候是通过 patch 的方式来处理这个问题的, 就是每次在编译那个平台的程序时都会先打上这个 patch.

@jouyouyun
jouyouyun / debug.md
Last active January 20, 2016 08:51
Debug methods
@jouyouyun
jouyouyun / ci_summit.md
Last active January 18, 2016 14:44
ci_summit
 inputdevices: fixed deadlock
 
 - using mouse's double-click and drag-threshold replace tpad's
  • add global var 'xsSetting' to avoid gsettings signal cycle emit. But why?
@jouyouyun
jouyouyun / shadowsocks-libev.md
Created September 1, 2015 08:25
Shadowsocks libev

shadowsocks-libev

Intro

Shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes.

It is a port of shadowsocks

@jouyouyun
jouyouyun / fc-match.c
Created July 30, 2015 12:43
Test fontconfig match
#include <fontconfig/fontconfig.h>
#include <stdio.h>
int
main (int argc, char* argv[])
{
char* key = "monospace";
FcObjectSet* os = NULL;
// configure the search pattern
FcPattern* pat = FcNameParse((FcChar8*)key);
@jouyouyun
jouyouyun / zone_info.json
Created May 5, 2015 07:12
Timezone info
{
"ZoneInfoList":[
{
"Zone": "Pacific/Midway",
"UTCOffset": "-11:00",
"Desc": "Midway",
"HasDST": false,
"DSTOffset": ""
},
{
@jouyouyun
jouyouyun / source.list
Created December 25, 2014 02:00
source.list
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb http://ca.archive.ubuntu.com/ubuntu/ trusty main restricted universe
deb-src http://ca.archive.ubuntu.com/ubuntu/ trusty main restricted universe
###### Ubuntu Update Repos
deb http://ca.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe
@jouyouyun
jouyouyun / compile.sh
Created August 28, 2014 02:42
compile test_mouse.c
sudo apt-get install libgtk-3-dev libglib2.0-dev libxi-dev
gcc -Wall -g test_mouse.c `pkg-config --libs --cflags xi gdk-3.0 glib-2.0` -o test-mouse
@jouyouyun
jouyouyun / test_malloc.c
Last active August 29, 2015 14:05
Test malloc
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int *p;
p = (int*)malloc(sizeof(int));
if (p == NULL) {
@jouyouyun
jouyouyun / test.md
Last active August 29, 2015 14:05
Test table