Skip to content

Instantly share code, notes, and snippets.

View flyfloor's full-sized avatar
🎯
Focusing

jerry flyfloor

🎯
Focusing
View GitHub Profile
@flyfloor
flyfloor / # Sublime Emmet JSX Reactjs.md
Created September 5, 2016 02:59 — forked from max-mykhailenko/# Sublime Emmet JSX Reactjs.md
Sublime text 3. Enable Emmet in JSX files with Sublime React plugin

This is no longer needed as Emmet supports JSX - you just need to turn it all on. Did a quick tutorial: http://wesbos.com/emmet-react-jsx-sublime/

Thanks, @wesbos

Problem

  • Using emmet in jsx files
  • Emmet expands text when js autocomplete needed
@flyfloor
flyfloor / promises.md
Created September 5, 2016 02:58 — forked from domenic/promises.md
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@flyfloor
flyfloor / audio_tag.rb
Created September 5, 2016 02:58 — forked from HKLF4/audio_tag.rb
Octopress HTML5 Audio Tag
# Title:
# Octopress HTML5 Audio Tag
# http://antoncherkasov.me/projects/octopress-plugins
# Author:
# Anton Cherkasov
# http://antoncherkasov.me
# antoncherkasov@me.com
# Syntax:
# {% audio url/to/mp3 %}
# {% audio url/to/mp3 url/to/ogg %}
@flyfloor
flyfloor / default.custom.yaml
Created May 28, 2016 08:59 — forked from lotem/default.custom.yaml
在Rime輸入方案選單中添加五筆、雙拼、粵拼、注音,保留你需要的
# default.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
schema_list:
- schema: luna_pinyin # 朙月拼音
- schema: luna_pinyin_simp # 朙月拼音 简化字模式
@flyfloor
flyfloor / material-theme.terminal
Last active September 16, 2015 01:05 — forked from mvaneijgen/material-theme.terminal
material-theme.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2
@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"
# 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 / .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 {