Skip to content

Instantly share code, notes, and snippets.

View Chun-Yang's full-sized avatar

yang2007chun Chun-Yang

View GitHub Profile
@Chun-Yang
Chun-Yang / linux_command_get_filename_without_extension.txt
Created May 29, 2014 16:57
linux, sed ls, get filename without extension
ls | sed 's/\.[^.]*$//'
@Chun-Yang
Chun-Yang / sublime package list.txt
Created May 29, 2014 16:57
sublime package list
# sublime package list
Better CoffeeScript
DocBlockr
ERB Snippets
EasyMotion
Inc-Dec-Value
Select Quoted
Text Pastry
auto-save
@Chun-Yang
Chun-Yang / Default (Linux).sublime-keymap
Created May 30, 2014 00:56
sublime key bindings linux
[
// -------------------------------------------------------------------------
// Auto-complete behaviour for ), ], '', ""
// Bind to <tab> to step over the auto-completed character(s)
// -------------------------------------------------------------------------
{ "keys": ["tab"], "command": "move", "args": {"by": "characters", "forward": true},
"context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)\\]'\"]", "match_all": true },
@Chun-Yang
Chun-Yang / .bashrc
Created May 30, 2014 01:08
git short cut, show git status and branch
alias subl="sublime"
# git alias
alias gs='git status'
alias ga='git add -A'
alias gb='git branch'
alias gc='git commit -m '
alias gl='git log'
alias gp='git push'
alias go='git checkout '
@Chun-Yang
Chun-Yang / .bashrc
Created May 30, 2014 01:13
linux only show dir on command line, add handy aliases
# Change PS1 to only display \w full path
# Comment this to go back to default
PS1='\w\$ '
# Show date before any prompt
# PROMPT_COMMAND="date +%k:%m:%S"
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
@Chun-Yang
Chun-Yang / Default (OSX).sublime-keymap
Created June 10, 2014 20:07
sublime key bindings mac
[
// -------------------------------------------------------------------------
// Auto-complete behaviour for ), ], '', ""
// Bind to <tab> to step over the auto-completed character(s)
// -------------------------------------------------------------------------
{ "keys": ["tab"], "command": "move", "args": {"by": "characters", "forward": true},
"context":
[
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)\\]'\"]", "match_all": true },
# Chinese (China) translations for Devise(3.2.2)
# by Kenrick-Zhou (https://github.com/Kenrick-Zhou)
# https://gist.github.com/Kenrick-Zhou/7909822
zh-CN:
devise:
confirmations:
confirmed: "您的帐号已经确认,您现在已登录。"
send_instructions: "几分钟后,您将收到确认帐号的电子邮件。"
send_paranoid_instructions: "如果您的邮箱存在于我们的数据库中,您将收到一封确认账号的邮件。"
# Chinese (China) translations for Devise(3.2.2)
# by Kenrick-Zhou (https://github.com/Kenrick-Zhou)
# https://gist.github.com/Kenrick-Zhou/7909822
zh-CN:
devise:
confirmations:
confirmed: "您的帐号已经确认,您现在已登录。"
send_instructions: "几分钟后,您将收到确认帐号的电子邮件。"
send_paranoid_instructions: "如果您的邮箱存在于我们的数据库中,您将收到一封确认账号的邮件。"
1. Position does not cascade
2. Static:
- Default
- Does not have a z-index
3. Relative:
- Relative to default(static)
- Has a z-index value
- Limit scope of absolutely positioned child element
4. Absolute:
- Relative to a parent(which is relative or absolute positioned)
@Chun-Yang
Chun-Yang / css inline image at right
Last active August 29, 2015 14:17
CSS inline image icon at right
https://jsfiddle.net/LfgnLz91/
<div class="wrapper wrapper-icon-right icon-check-right">
<input type="text" >
</div>
.wrapper {
width: 100%;
box-sizing: border-box;