Skip to content

Instantly share code, notes, and snippets.

zikkeung zikkeung

Block or report user

Report or block zikkeung

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 1-device-px-border
/*上,下边框*/
.tBor:before,
.bBor:after{
position:absolute;
content: "";
height:1px;
background:red;
left:0;
right:0;
}
View git.md

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
View vimrc
set nocompatible " 设置不兼容VI
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'bling/vim-airline'
"Bundle 'kien/ctrlp.vim'
"Bundle 'scrooloose/nerdtree'
@zikkeung
zikkeung / javascript检测网络连接是否正常.js
Created Jan 20, 2014
javascript检测网络连接是否正常
View javascript检测网络连接是否正常.js
function doesConnectionExist(file) {
var xhr = new XMLHttpRequest();
var randomNum = Math.round(Math.random() * 10000);
xhr.open('HEAD', file + "?rand=" + randomNum, false);
try {
xhr.send();
if (xhr.status >= 200 && xhr.status < 304) {
View 高频执行事件、方法的防抖
// 取自 UnderscoreJS 实用框架
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
View gist:7734060

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@zikkeung
zikkeung / gist:6338424
Created Aug 26, 2013
CSS 居中大全
View gist:6338424
<center>
不建议用了。
text-align:center
在父容器里水平居中 inline 文字,或 inline 元素
View 在Mac上开关隐藏文件的显示
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
把 TRUE 换曾 FALSE 就可以关闭显示隐藏文件。
@zikkeung
zikkeung / 在Finder标题栏显示当前文件夹路径
Created Aug 21, 2013
在Finder标题栏显示当前文件夹路径
View 在Finder标题栏显示当前文件夹路径
打开“终端”(应用程序->实用工具),输入以下两条命令:
defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE;killall Finder
You can’t perform that action at this time.