Skip to content

Instantly share code, notes, and snippets.

View zhiyue's full-sized avatar
🌻
just do it.

zhiyue zhiyue

🌻
just do it.
View GitHub Profile
@zhiyue
zhiyue / replaceBlank.java
Created May 11, 2015 12:55
java去除字符串中的空格、回车、换行符、制表符
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author lei
* 2011-9-2
*/
public class StringUtils {
@zhiyue
zhiyue / tmux.conf
Last active October 27, 2015 12:59 — forked from spicycode/tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zhiyue
zhiyue / kawa_post.py
Created July 8, 2015 03:56
test kawa transform
# !/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'zhibin'
import requests
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
@zhiyue
zhiyue / solarized-dark.xcs
Last active August 31, 2015 02:01 — forked from clyfish/solarized-dark.xcs
xshell solarized dark color theme
[Solarized Dark]
text(bold)=839496
magenta(bold)=6c71c4
text=839496
white(bold)=fdf6e3
green=859900
red(bold)=cb4b16
green(bold)=586e75
black(bold)=073642
red=dc322f
@zhiyue
zhiyue / Python:Sublime Text 2 + Gist = 代码片段管理器
Created October 27, 2015 12:55
Python:Sublime Text 2 + Gist = 代码片段管理器
Sublime Text 2 + Gist = 代码片段管理器
MAR 7TH, 2012 | COMMENTS
来自 Nettuts+ 的视频教程 (Youtube/优酷),结合 Sublime Text 2 的 Gist 插件和 Github 提供的 Gist 代码片段分享平台,打造出一个能够很方便的进行创建、搜索插入、更新以及版本控制的代码片段管理器。
大致流程:
建立一个 Gist 账户。
@zhiyue
zhiyue / tmux_install.sh
Created October 30, 2015 12:24 — forked from P7h/tmux__CentOS__build_from_source.sh
tmux installation steps for Ubuntu
# tmux v2.0 installation steps for Ubuntu 14.04 (Trusty Tahr)
tmux -V
sudo apt-get update
sudo apt-get install -y python-software-properties software-properties-common
sudo add-apt-repository -y ppa:pi-rho/dev
sudo apt-get update
sudo apt-get install -y tmux
tmux -V
# tmux v1.9 installation steps for Ubuntu 14.04 (Trusty Tahr)
@zhiyue
zhiyue / spark_test.py
Created November 3, 2015 01:50 — forked from magigo/spark_test.py
Spark 1.3.0 PyCharm 本地开发环境例程
import os
import sys
import traceback
import json
# Path for spark source folder
os.environ['SPARK_HOME']="/Users/jilu/Downloads/spark-1.3.0-bin-hadoop2.4"
# Append pyspark to Python Path
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zhiyue
zhiyue / gist:f084cd029e9f9840a056
Created December 19, 2015 06:27 — forked from cuimuxi/gist:3719516
gevent crawler
import gevent
from gevent import monkey, queue
monkey.patch_all()
import urllib2
from time import sleep
import traceback
import logging