Skip to content

Instantly share code, notes, and snippets.

View flyfloor's full-sized avatar
🎯
Focusing

jerry flyfloor

🎯
Focusing
View GitHub Profile
@flyfloor
flyfloor / gist:aa0cd257725d354dc2d1
Last active January 21, 2016 02:24
drowning in problems, game auto play : )
(function(){
setInterval(function(){
var doms = document.getElementsByTagName('a');
for(var i in doms){
if(doms[i].text == "Solve"){
doms[i].click();
}
}
}, 2000);
})();
@flyfloor
flyfloor / main.css
Created October 7, 2014 14:51
Image in center of the container
li {
list-style: none;
display:inline-block;
margin:20px;
background:#444;
width:300px;
height:300px;
overflow:hidden;
}
gem install libv8 -v '3.16.14.3' -- --with-system-v8
gem install nokogiri -v '1.6.3.1' -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib
git update-index --assume-unchanged config/deploy/xxx
bundle exec rake environment RAILS_ENV=production namespace:taskname
@flyfloor
flyfloor / .bashrc
Last active August 29, 2015 14:25 — forked from richarddong/.bashrc
alias g=git
# Ubuntu 中 Terminal 下 Bash 提示中显示 git 当前分支和状态
# username@hostname:directory[branch-name]$ # 干净的工作目录
# username@hostname:directory[branch-name*]$ # 不干净的工作目录
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background and the font Inconsolata.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# http://blog.ysmood.org/2013/03/my-ys-terminal-theme/
# Mar 2013 ys
# Git Info
local git_info='$(git_prompt_info)'
@flyfloor
flyfloor / gist:3659091b82af3aae49df
Last active December 1, 2016 01:51 — forked from neilcarpenter/gist:8979ea9ed91b10e36af9
Enable Emmet in .JSX files, using Babel JSX Syntax highlighter
// add to Preferences > Key Bindings - User
// see http://stackoverflow.com/a/26619524 for context
{ "keys": ["tab"], "command": "expand_abbreviation_by_tab",
"context": [
{
"operand": "source.js",
"operator": "equal",
"match_all": true,
"key": "selector"
@flyfloor
flyfloor / Alfred_Features_Terminal&Shell_Application_Custom
Created September 9, 2015 04:05
Fix bug that Alfred can't run command with iTerm 2.1.1
-- This is v0.3 of the custom script for AlfredApp for iTerm 2.1.1
-- Please see https://github.com/stuartcryan/custom-iterm-applescripts-for-alfred/
-- for the latest changes.
on is_running(app_name)
tell application "System Events" to (name of processes) contains app_name
end is_running
-- Please note, if you store the iTerm binary in any other location than the Applications Folder
-- please ensure you update the two locations below (in the format of : rather than / for folder dividers)