Skip to content

Instantly share code, notes, and snippets.

@wusuopu
wusuopu / PyGTK_TreeView.py
Created April 15, 2012 02:10
pygtk TreeView example for all CellRenderer
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# @作者(author): 龙昌锦(LongChangjin)
# @博客(blog): http://www.xefan.com
# @邮箱(mail): [email protected]
# @QQ: 346202141
# @时间(date): 2012-04-15
#
@wusuopu
wusuopu / 115.py
Created May 15, 2012 03:13
a script auto to login 115
#!/usr/bin/env python
#-*- coding:utf-8 -*-
##
##
# Copyright (C)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation.
# 本程序是免费软件,基于GPL许可发布。
" pentadactylrc 1.0
loadplugins '\.(js|penta)$'
group user
" vim: set ft=pentadactyl:
map J <C-d>
map K <C-u>
" 修改Ctrl快捷键
"3.5 (created: 2012/08/04 00:41:20)
source! ~/.vimperatorrc.local
" vim: set ft=vimperator:
map J <C-d>
map K <C-u>
map <C-`> :stop<CR>
@wusuopu
wusuopu / python_capi_thread.c
Created April 22, 2013 12:40
在Python api中使用线程
#include <Python.h>
#include <pythread.h>
static void test(void *s)
{
while (1)
{
printf("in sub thread\n");
sleep(1);
}
@wusuopu
wusuopu / python_capi_pthread.c
Created April 22, 2013 12:49
在python中使用C的多线程。
#include <Python.h>
#include <pythread.h>
#include <pthread.h>
void* test(void *ptr)
{
while (1)
{
printf("in C thread\n");
sleep(1);
@wusuopu
wusuopu / z.sh
Created November 26, 2013 01:25
# Copyright (c) 2009 rupa deadwyler under the WTFPL license
# maintains a jump-list of the directories you actually use
#
# INSTALL:
# * put something like this in your .bashrc/.zshrc:
# . /path/to/z.sh
# * cd around for a while to build up the db
# * PROFIT!!
# * optionally:
@wusuopu
wusuopu / doraemon.html
Created December 4, 2013 14:53
CSS绘制多啦A梦
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title>ドラえもん</title>
<style type="text/css">
@-moz-keyframes eye {
0% { top: 8px;}
50% { top: 19px;}
100% { top: 8px;}
@wusuopu
wusuopu / mugiwara.html
Created December 11, 2013 14:03
CSS绘制海贼王 草帽路飞的海贼旗
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title>むぎわら</title>
<style type="text/css">
h1 {
text-align: center;
}
#container {
@wusuopu
wusuopu / mkgitignore
Last active March 19, 2017 03:11
生成.gitignore文件
#!/bin/bash
if [[ $@ != "" ]]; then
if [[ $2 != "" ]]; then
curl http://www.gitignore.io/api/$1 -o $2
else
curl http://www.gitignore.io/api/$1
fi
else
echo 创建gitignore文件