Skip to content

Instantly share code, notes, and snippets.

View zikkeung's full-sized avatar

zheng mingyou zikkeung

  • 盈合机器人
  • 深圳
View GitHub Profile
/*上,下边框*/
.tBor:before,
.bBor:after{
position:absolute;
content: "";
height:1px;
background:red;
left:0;
right:0;
}
@zikkeung
zikkeung / git.md
Last active August 29, 2015 14:17 — forked from suziewong/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

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 January 20, 2014 02:01
javascript检测网络连接是否正常
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) {
@zikkeung
zikkeung / 高频执行事件、方法的防抖.js
Last active November 26, 2019 07:26
|-|{"files":{"高频执行事件、方法的防抖.js":{"env":"js"}},"tag":"Uncategorized"}
// 取自 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;

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 August 26, 2013 05:59
CSS 居中大全
<center>
不建议用了。
text-align:center
在父容器里水平居中 inline 文字,或 inline 元素
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
把 TRUE 换曾 FALSE 就可以关闭显示隐藏文件。
@zikkeung
zikkeung / 在Finder标题栏显示当前文件夹路径
Created August 21, 2013 05:24
在Finder标题栏显示当前文件夹路径
打开“终端”(应用程序->实用工具),输入以下两条命令:
defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE;killall Finder