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:477b2b54903b7ef3eb50
Created March 25, 2016 10:21
react npm package build
babel --presets es2015,react --watch component/ --out-dir lib/
@flyfloor
flyfloor / gist:3ba66174d434d8acba10
Created February 16, 2016 03:07
for state test
1. Object.freeze //'use strict'
@flyfloor
flyfloor / gist:6a3db0f50b419b43ee3e
Last active February 9, 2016 11:24
redux demo: counter
// reducer receive state and action, create new state
const counterReducer = (state = 0, action) => {
switch(action.type){
case 'INCREASE':
return state + 1;
case 'DECREASE':
return state - 1;
default:
return state;
body::-webkit-scrollbar {
width: 1em;
}
body::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}
body::-webkit-scrollbar-thumb {
background-color: darkgrey;
body::-webkit-scrollbar {
width: 1em;
}
body::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}
body::-webkit-scrollbar-thumb {
background-color: darkgrey;
@flyfloor
flyfloor / gist:90011ace93deb7c22ca6
Created November 10, 2015 10:31
sublime key bind
[
// { "keys": ["ctrl+super+p"], "command": "swap_line_up" },
// { "keys": ["ctrl+super+n"], "command": "swap_line_down" },
// 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",
@flyfloor
flyfloor / gist:4c3cb62248595466f757
Last active August 10, 2016 08:52
sublime 3 user settings
{
"always_show_minimap_viewport": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"fade_fold_buttons": false,
"font_face": "Monaco",
"font_size": 13,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
@flyfloor
flyfloor / gist:fac1fe47649beb278f91
Last active October 16, 2015 02:03
auto extend input
e.target.style.width = (e.target.value.length + 1) * 8 + 'px'
@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
<div class="shadow">
<div class="loader">
<div class="mask"></div>
</div>​
</div>