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
@allenfantasy
allenfantasy / MyDoubleTap.js
Last active August 29, 2015 13:56
Custom event configuration in Sencha Touch 2
// MyLib/event/recognizer/MyDoubleTap.js
Ext.define('Mylib.event.recognizer.MyDoubleTap', {
extend:'Ext.event.recognizer.DoubleTap',
config:{
// default value is 300
maxDuration:10000;//=> two taps in 10s would be considered as doubletap
}
});
.navbar
.caret
.label
.table
.img-responsive
.img-rounded
.img-thumbnail
.img-circle
.sr-only
.lead
body {
font-family: 'Myriad-Pro', 'myriad', helvetica, arial, sans-serif;
text-align: center;
}
h1 {
text-align: left;
}
input { font-size: 14px; font-weight: bold; }
input[type=range]:before { content: attr(min); padding-right: 5px; }
function _setListeners() {
this.heartSurface.on('click', this.clickListener.bind(this));
}
function HeartView() {
View.apply(this, arguments);
_createHeart.call(this); // create HeartSurface
_setListeners.call(this);
}
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) {
[core]
editor = vim
[alias]
ci = commit -v
co = checkout
st = status
br = branch
throw = reset --hard HEAD
throwh = reset --hard HEAD^
[color]
@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
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;