Skip to content

Instantly share code, notes, and snippets.

View wanghongfei's full-sized avatar
🎯
Focusing

wanghongfei wanghongfei

🎯
Focusing
View GitHub Profile
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"font_face": "Bitstream Vera Sans Mono",
//"font_face": "Droid Sans Mono",
//"font_face": "Liberation Mono",
//"font_face": "DejaVu Sans Mono",
"font_size": 11,
"font_options": [],
// Set to 0 to disable smooth scrolling. Set to a value between 0 and 1 to
// scroll slower, or set to larger than 1 to scroll faster
@wanghongfei
wanghongfei / .bashrc
Created July 10, 2014 18:29
Debian .bashrc configuration
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@wanghongfei
wanghongfei / remove-git.sh
Created July 10, 2014 18:32
Remove Git version control
#!/bin/bash
# This script is used to remove ".svn" directory resursively in the current directory
# author: Neo Smith
# 2014.4.27
del_svn() {
for file in `ls -a`; do
# ignore . and ..
if [ "." == $file -o ".." == $file ]; then
@wanghongfei
wanghongfei / eat-tip
Created June 18, 2015 15:00
提醒自己订餐,要不明天中午没的吃了
__author__ = 'wanghongfei'
# -*- coding:utf8 -*-
import Tkinter
WIDTH = 300
HEIGHT = 200
# centralize window
def center_window(root, w, h):
@wanghongfei
wanghongfei / del-git.py
Created June 18, 2015 16:18
清除git版本控制
__author__ = 'wanghongfei'
# -*- coding:utf8 -*-
import os
# 删除指定目录下的所有文件
def del_dir(base_path):
file_list = os.listdir(base_path)
for name in file_list:
@wanghongfei
wanghongfei / schedule.java
Created June 19, 2015 06:44
tbschedule DEMO
package com.anzhi.schedule.task;
import com.anzhi.schedule.model.PassportModel;
import com.taobao.pamirs.schedule.IScheduleTaskDealSingle;
import com.taobao.pamirs.schedule.TaskItemDefine;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import java.sql.ResultSet;
import java.sql.SQLException;
# encoding=UTF-8
__author__ = 'whf'
import socket
import subprocess
import sys
HOST = ''
PORT = 9013
# encoding=UTF-8
__author__ = 'whf'
import socket
import subprocess
import sys
import thread
HOST = ''
PORT = 9013
@wanghongfei
wanghongfei / RequsetParser.java
Created December 22, 2015 16:55
Netty HTTP请求参数解析器, 支持GET和POST
package cn.fh.http.component;
import cn.fh.http.exception.BaseCheckedException;
import cn.fh.http.exception.MethodNotSupportedException;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.QueryStringDecoder;
import io.netty.handler.codec.http.multipart.Attribute;
import io.netty.handler.codec.http.multipart.HttpPostRequestDecoder;
import io.netty.handler.codec.http.multipart.InterfaceHttpData;
@wanghongfei
wanghongfei / clean-target.sh
Created April 2, 2016 13:15
递归当前目录下所有target/目录
#!/bin/bash
log_info() {
echo "[INFO] => $1"
}
log_del() {
echo "[DELETE] => $1"
}