Skip to content

Instantly share code, notes, and snippets.

View codeskyblue's full-sized avatar

codeskyblue codeskyblue

View GitHub Profile
@codeskyblue
codeskyblue / showmetainfo.py
Created February 19, 2014 03:39
torrent信息查看工具 showmetainfo
#!/usr/bin/python
# Written by Henry 'Pi' James and Loring Holden
# modified for multitracker display by John Hoffman
# see LICENSE.txt for license information
# dependency
# $ pip install bencode
from sys import *
@codeskyblue
codeskyblue / monitor.py
Created August 14, 2014 02:56
use goless to implement monitor
import goless
import time
import gevent
from gevent import monkey
monkey.patch_all()
def time_after(seconds):
c = goless.chan()
def _fn():
gevent.sleep(seconds)
@codeskyblue
codeskyblue / ftpserver.py
Created October 24, 2014 07:30
ftpserver which support .ftpignore
#!/usr/bin/env python
# coding: utf-8
#
import fnmatch
import os
import pathspec
import pyftpdlib
from pyftpdlib.filesystems import AbstractedFS
from pyftpdlib.authorizers import DummyAuthorizer
@codeskyblue
codeskyblue / README.txt
Created February 13, 2015 06:46
Get Process Cpu Percent
go run_percent.go -p $PID
@codeskyblue
codeskyblue / msv.sh
Created February 27, 2015 09:28
help tool for supervisorctl
#!/bin/bash
#
# help tool of supervisorctl
#
# reference: http://supervisord.org/
RUNUSER=hzsunshx
CONFDIR="/etc/supervisor/conf.d/"
CRED='\033[0;31m'
@codeskyblue
codeskyblue / save_button.html
Created June 18, 2015 15:52
Button: Edit --> Saving --> Saved
<!DOCTYPE html>
<html>
<head>
<script src="bower_components/angularjs/angular.min.js"></script>
<style>
.button {
margin: 0;
padding: 5px 10px;
min-width: 54px;
font-size: 13px;
@codeskyblue
codeskyblue / which.py
Created July 28, 2015 08:16
Find python lib path
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: hzsunshx
# Created: 2015-06-01 15:56
"""
find python lib path
"""
@codeskyblue
codeskyblue / app_.gitignore
Created December 11, 2015 07:15
android studio, uiautomator
/build
package com.example.hzsunshx.helloworld;
import android.content.Context;
import android.content.Intent;
import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
import android.support.test.uiautomator.UiObject2;
import android.support.test.uiautomator.Until;
@codeskyblue
codeskyblue / gist:6432491
Created September 4, 2013 03:32
what's the result?
package main
import "fmt"
import "time"
var ss = []string{"foo", "bar"}
func main() {
for _, name := range ss {
go func(){