Skip to content

Instantly share code, notes, and snippets.

View ivanberry's full-sized avatar
🎯
Focusing

Tab_BLee ivanberry

🎯
Focusing
  • Ltd. Ltd
  • ShenZhen, China
View GitHub Profile
@ivanberry
ivanberry / learning_resources.md
Created October 31, 2015 09:56 — forked from nathansmith/web-design-development-learning-resources.md
Resources for learning web design & front-end development
@ivanberry
ivanberry / tmux-cheatsheet.markdown
Created December 18, 2015 03:02 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ivanberry
ivanberry / git.md
Created March 21, 2016 01:21 — forked from suziewong/git.md
Git的多账号如何处理? 1.同一台电脑多个git(不同网站的)账号 2.同一台电脑多个git(同一个网站的比如github的)多个账号

1.同一台电脑可以有2个git账号(不同网站的)

首先不同网站,当然可以使用同一个邮箱,比如我的github,gitlab,bitbucket的账号都是monkeysuzie[at]gmail.com 这时候不用担心密钥的问题,因为这些网站push pull 认证的唯一性的是邮箱 比如我的windows 上 2个账号一个gitlab 一个github (用的都是id_rsa)

host github
  hostname github.com
  Port 22

host gitlab.zjut.com

```html
<fieldset class="rating">
<legend>Please rate:</legend>
<input type="radio" id="star5" name="rating" value="5" />
<label for="star5" title="Rocks!">5 stars</label>
<input type="radio" id="star4" name="rating" value="4" />
<label for="star4" title="Pretty good">4 stars</label>
<input type="radio" id="star3" name="rating" value="3" />
<label for="star3" title="Meh">3 stars</label>
<input type="radio" id="star2" name="rating" value="2" />
// Simple JavaScript Templating
// John Resig - http://ejohn.org/ - MIT Licensed
(function(){
var cache = {};
this.tmpl = function tmpl(str, data){
// Figure out if we're getting a template, or if we need to
// load the template - and be sure to cache the result.
var fn = !/\W/.test(str) ?
cache[str] = cache[str] ||
@ivanberry
ivanberry / .eshintrc
Created December 3, 2016 03:05 — forked from bitzip/.eshintrc
个人偏好的eslint配置,带中文注释
# 建议:官方文档对每个规则有简单易懂的例子说明,有时间的同学可以查阅一遍。
# 官方文档 http://eslint.org/docs/rules/
extends: 'eslint:recommended'
# 规则按照首字母在字母表升序排序
rules:
# 单行代码块大括号后需要一个空格
block-spacing: 2
`emacs --daemon` to run in the background.
`emacsclient.emacs24 <filename/dirname>` to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
* Undo - `C-/`
* Redo - `C-?`
* Change case: 1. Camel Case : `M-c`
2. Upper Case : `M-u`
3. Lower Case : `M-l`
@ivanberry
ivanberry / interval.js
Created September 15, 2017 08:31 — forked from manast/interval.js
Accurate Javascript setInterval replacement
function interval(duration, fn){
this.baseline = undefined
this.run = function(){
if(this.baseline === undefined){
this.baseline = new Date().getTime()
}
fn()
var end = new Date().getTime()
this.baseline += duration

100 Stupid Questions for React Native

What is React Native? Is it same as React?

React Native lets you build mobile apps using only JavaScript. It uses the same design as React, letting you compose a rich mobile UI from declarative components.

https://facebook.github.io/react-native/

Is React Native easy to learn?

It depends on what project you are going to build. As for front-end developer, you nearly need to learn nothing, only a new way to write javascript (Redux, JSX).

Do I must learn Redux?

@ivanberry
ivanberry / render.md
Last active March 8, 2018 09:25
Basic template render function

Make a basic template render function

Given:

var str = '{{name}}is cool, and he is only {{age}} years old!';
var context = {
  name: 'ivanberry',
  age: 20
}