Skip to content

Instantly share code, notes, and snippets.

View yingray's full-sized avatar
:octocat:

Ray Lu yingray

:octocat:
View GitHub Profile
@yingray
yingray / fix-layout.css
Created August 29, 2017 03:30
Force Safari to repaint(position: fixed) elements on scroll!
.foo
position: fixed
&.active
animation: repaint 1ms
@keyframes repaint
from
width: 99.999%
to
width: 100%
@yingray
yingray / README.md
Created August 31, 2017 17:22 — forked from smileart/README.md
My ZSH Theme — Agnoster Mod

My modified fork of agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

Compatibility

@yingray
yingray / .vimrc
Created September 4, 2017 05:42
My vim configuration
" Powerline for Vim
set rtp+=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/powerline/bindings/vim/
set laststatus=2
set t_Co=256
" 顯示列號
set number
" 語法高亮度顯示
syntax on
" 標記搜尋到的字串
@yingray
yingray / .gitconfig
Created September 9, 2017 07:37
Git configuration
[user]
name = Yingray Lu
email = yingray.lu@fuhu.com
[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
@yingray
yingray / space.icls
Last active September 21, 2017 06:33
IDEA theme
<scheme name="yingray_space" version="142" parent_scheme="Darcula">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2017-09-14T22:23:09</property>
<property name="ide">Idea</property>
<property name="ideVersion">2017.2.4.0.0</property>
<property name="modified">2017-09-21T14:31:57</property>
<property name="originalScheme">yingray_winds</property>
</metaInfo>
<option name="EDITOR_FONT_SIZE" value="12" />
@yingray
yingray / database_compare.csv
Created February 12, 2018 08:19
database_compare.csv
ES SQL MongoDB
Index Database Database
Shard Shard Shard
Type Table Collection
Field Column Field
Object Record Record
@yingray
yingray / docker-compose.yml
Last active March 1, 2018 07:58
Elasticsearch sample compose file
version: '3.1'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.1
ports:
- 9200:9200
- 9300:9300
volumes:
- ./config/analysis:/usr/share/elasticsearch/config/analysis
@yingray
yingray / .eslintrc
Created April 3, 2018 09:11
Airbnb ESlint configuration
{
"extends": ["eslint:recommended", "airbnb"],
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true
},
"parser": "babel-eslint",
"parserOptions": {
@yingray
yingray / .zshrc
Last active July 28, 2018 01:06
[2018.4] Terminal Configuration - Macbook pro 15"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/yingray_lu/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
@yingray
yingray / android_instructions.md
Created April 12, 2018 05:35 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"