Skip to content

Instantly share code, notes, and snippets.

View allenfantasy's full-sized avatar
😸
Feeding my cat

Zeqiu Wu allenfantasy

😸
Feeding my cat
View GitHub Profile
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.0.deb
sudo dpkg -i elasticsearch-0.90.0.deb
@allenfantasy
allenfantasy / FilePreview
Created October 4, 2013 15:57
file preview by javascript. Reaaaaaally rocks!
// html
<form id="form1" runat="server">
<input type='file' id="imgInp" />
<img id="blah" src="#" alt="your image" />
</form>
// javascript
function readURL(input) {
@allenfantasy
allenfantasy / .vimrc
Created November 2, 2013 02:39 — forked from huacnlee/.vimrc
"Vim 配置文件 for Bash
filetype indent on
syntax on
set sw=2
set ts=2
set history=100
set iskeyword+=_,$,@,%,#,-
set backspace=2
set autoindent
set nowrap
[core]
editor = vim
[alias]
ci = commit -v
co = checkout
st = status
br = branch
throw = reset --hard HEAD
throwh = reset --hard HEAD^
[color]
require "bundler/capistrano"
set :application, "blog"
set :repository, "git@github.com:happypeter/blog.git"
set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :user, "deployer"
set :deploy_to, "/home/#{user}/#{application}"
set :deploy_via, :remote_cache
set :use_sudo, true
worker_processes 1;
user nobody nogroup;
pid /tmp/nginx.pid;
error_log /tmp/nginx.error.log;
events {
worker_connections 1024;
accept_mutex off;
}
http {
default_type application/octet-stream;
@allenfantasy
allenfantasy / .tmux.conf
Last active December 28, 2015 22:49
tmux conf
set -g default-command /bin/zsh set -g default-shell /bin/zsh
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-window-option -g mode-mouse on
audio {
display: none;
}
#box {
width: 300px;
background-color: #f8f8f8;
padding: 10px;
}
.details {
height: 0px;
overflow: hidden;
}
.close {
.flexcroll{ height:200px;
overflow:auto;
}
.flexcroll{
scrollbar-face-color: #367CD2;
scrollbar-shadow-color: #FFFFFF;
scrollbar-highlight-color: #FFFFFF;
scrollbar-3dlight-color: #FFFFFF;
scrollbar-darkshadow-color: #FFFFFF;
scrollbar-track-color: #FFFFFF;