A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Brandon B. brandon@brandonbrown.io
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Shell脚本编程30分钟入门 | |
==================== | |
## 什么是Shell脚本 | |
### 示例 | |
看个例子吧: | |
#!/bin/sh | |
cd ~ | |
mkdir shell_tut | |
cd shell_tut |
/** @jsx React.DOM */ | |
define(['reactjs'], function(React){ | |
return React.createClass({ | |
getDefaultProps: function(){ | |
return { | |
multiple: false | |
/* | |
name: 'mySelect' |
/** @jsx React.DOM */ | |
var STATES = [ | |
'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', | |
'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', | |
'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', | |
'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY' | |
] | |
var Example = React.createClass({ |
//安卓不支持willShow方法,统一在didShow中处理 | |
RCTDeviceEventEmitter.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', evt=> { | |
if (!writeStore.isLoggingin) { | |
dispatcher.dispatch({ | |
namespace: 'write', | |
action: 'keyboardShow', | |
data: { | |
keyboardHeight: evt.endCoordinates.height |
// include part of the element | |
// 包含元素的一部分区域在可以区域 | |
function isElementVisble(el) { | |
if(!el) { | |
return; | |
} | |
var viewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); | |
var elPos = el.getBoundingClientRect(); | |
/** | |
* author: fa-ge | |
* github: https://github.com/fa-ge/LocalScrollFix | |
*/ | |
;(function() { | |
function createHeadTag() { | |
var styleNode = document.createElement('style') | |
styleNode.className = 'localscrollfix-head' | |
document.head.appendChild(styleNode) |
/** | |
* @desc: Toast | |
* @authors: yongxiang.li | |
* @date: 2016-08-10 18:49:05 | |
* | |
* Toast('message') | |
*/ | |
// TODO 增加位置自定义 |