Skip to content

Instantly share code, notes, and snippets.

View aispin's full-sized avatar

Livin AI aispin

View GitHub Profile
  1. Download SourceGear DiffMerge: http://sourcegear.com/diffmerge/index.html

  2. Add the following to your global .gitconfig file:

     [diff]
         tool = DiffMerge
     [difftool "DiffMerge"]
         cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' "$LOCAL" "$REMOTE"
     [merge]
    

tool = DiffMerge

## .gitconfig
[alias]
dt = difftool
mt = mergetool
[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]
@aispin
aispin / github-remove-submodule
Last active October 30, 2015 17:14 — forked from kyleturner/Remove Submodule
how to remove a git submodule
To remove a submodule you need to:
1.Delete the relevant section from the .gitmodules file.
2.Stage the .gitmodules changes git add .gitmodules
3.Delete the relevant section from .git/config.
4.Run git rm --cached path_to_submodule (no trailing slash).
5.Run rm -rf .git/modules/path_to_submodule
6.Commit git commit -m "Removed submodule <name>"
7.Delete the now untracked submodule files
rm -rf path_to_submodule
@aispin
aispin / github-submodule.sh
Last active August 29, 2015 13:58 — forked from necolas/gist:2215692
github submodule
# Workflow from https://github.com/necolas/dotfiles
# Add the new submodule
git submodule add git://example.com/remote/path/to/repo.git vim/bundle/one-submodule
# Initialize the submodule
git submodule init
# Clone the submodule
git submodule update
# Stage the changes
git add vim/bundle/one-submodule
/*
* OrientationChange Event Shim
* http://github.com/richtr
*
* Copyright (c) 2012, Rich Tibbett
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@aispin
aispin / rAF.js
Last active January 1, 2016 17:49 — forked from paulirish/rAF.js
requestAnimationFrame pollyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// Ref:https://gist.github.com/mamboer/8179563
(function(W) {
var lastTime = 0,
vendors = ['ms', 'moz', 'webkit', 'o'],
x,
length,
currTime,
/*=====日历控件=========*/
.calendar2{*width:536px;}
.calendar1{*width:268px;}
.calendar{
border: 1px solid #e1e1e1;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
/*Make position:fixed work in IE6!*/
.fixed-top /* position fixed Top */{position:fixed;bottom:auto;top:0;}
.fixed-bottom /* position fixed Bottom */{position:fixed;bottom:0;top:auto;}
.fixed-left /* position fixed Left */{position:fixed;right:auto;left:0;}
.fixed-right /* position fixed right */{position:fixed;right:0;left:auto;}
* html,* html body /* IE6 Fixed Position Jitter Fix */{background-image:url(about:blank);background-attachment:fixed;}
* html .fixed-top /* IE6 position fixed Top */{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}
* html .fixed-right /* IE6 position fixed right */{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));}
//
// CRUD API for RESTful services with URLs similar 'http://services.mysite.com/classes/Book'.
//
// e.g. parse.get(
// "Book",
// 123,
// function(response){ console.log(response.toString());}
// );
//
services.factory('parse', function($rootScope, $http) {
@aispin
aispin / jquery_removeClassByPrefix
Last active December 20, 2015 20:39 — forked from jakubp/gist:2881585
Remove classes that have given prefix
/*
* Remove classes that have given prefix
* Example:
* You have an element with classes "apple juiceSmall juiceBig banana"
* You run:
* $elem.removeClassByPrefix('juice');
* The resulting classes are "apple banana"
* NOTE: discussion of implementation techniques for this, including why simple RegExp with word boundaries isn't correct:
* http://stackoverflow.com/questions/57812/jquery-remove-all-classes-that-begin-with-a-certain-string#comment14232343_58533
* https://gist.github.com/mamboer/6191743