Skip to content

Instantly share code, notes, and snippets.

@mfine2
mfine2 / lefttime
Created April 8, 2013 08:04
show left time
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="left"></div>
<script type="text/javascript">
var showLeftTime = function (endStr, node) {
(function() {
var path = require('path'), fs = require('fs');
function walk(uri,filter,tree) {
var node = {
name : null,
children : [],
pNode : null,
};
var elem;
for ( var i = 0; elems[i]; i++ ) {
elem = elems[i];
// ...
}
(function(GLOBAL) {
// Phantom Limb
// ------------
// http://viewinglens.com/phantom-limb
// https://github.com/brian-c/phantom-limb
// [email protected]
"use strict";
// Default configuration
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.*;
public class JsonHelper {
public static Object toJSON(Object object) throws JSONException {
if (object instanceof Map) {
JSONObject json = new JSONObject();
cd
mkdir git-demo-01
cd git-demo-01
git status #查看版本库和所有工作目录树的差异
git init # 初始化版本库
git status #查看初始化后的提示
echo "hello git" > hello #创建文件hello,内容为hello git
git add hello #将hello增加到暂存区
git diff #查看暂存区与工作目录树的区别
git status #查看
@mfine2
mfine2 / git-config
Last active December 21, 2015 09:19
git config --global user.name "lixiao4"
git config --global user.email [email protected]
git config --global color.ui true
git log #查看提交日志
git branch #查看分支
git branch develop #从当前分支切出development分支
git branch #查看分支
git checkout develop #切换到develop分支
git branch #查看分支
echo "how old are you, git" >> hello
git diff
git status
git add hello
@mfine2
mfine2 / deploy.sh
Last active December 26, 2015 07:29
weibo dev kit deploy
if [ ! -n "$1" ] ; then
echo "please input svn username as the first parameter"
exit 0
fi
if [ ! -n "$2" ] ; then
echo "please input svn password as the second parameter"
exit 0
fi
echo "********** yum update **********"
@mfine2
mfine2 / vim-config
Created January 7, 2014 03:39
vim-config
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif