Skip to content

Instantly share code, notes, and snippets.

View aispin's full-sized avatar

Livin AI aispin

View GitHub Profile
@aispin
aispin / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
(function ($){
var check=false, isRelative=true;
$.elementFromPoint = function(x,y)
{
if(!document.elementFromPoint) return null;
if(!check)
{
var sl;
@aispin
aispin / loopback-paginate-scope
Created March 11, 2015 10:01
Loopback enhance, add pagination feature to the related scope object
// scope object pagination method
// reference : strong-remoting/lib/remote-objects.js line 550
// reference : strong-remoting/lib/shared-method.js line 245
define('__paginate__' + scopeName, {
isStatic: isStatic,
http: {verb: 'get', path: '/' + pathName+'/paginate'},
accepts: {arg: 'filter', type: 'object'},
description: 'Pagination Queries ' + scopeName + ' of ' + this.modelName + '.',
accessType: 'READ',
returns: {arg: scopeName, type: [toModelName], root: true}
@aispin
aispin / wr2014.css
Created December 10, 2014 11:44
css for webrebuild.org/2014
/*!
Animate.css - http://daneden.me/animate
Licensed under the MIT license - http://opensource.org/licenses/MIT
Copyright (c) 2013 Daniel Eden
*/
.animated,.conf .conf-time,.conf .conf-title .conf-point,.conf .conf-title .conf-text,.conf .conf-title .conf-ver,.intro .slogan .slogan-bg,.intro .slogan .slogan-drops,.intro .slogan .slogan-text,.intro .slogan .slogan-time,.intro .slogan-tips,.talk .talk-title .talk-circle,.talk .talk-title .talk-text span,.topical .topical-content,.topical .topical-title .topical-circle,.topical .topical-title .topical-text {
-webkit-animation-duration:1s;
animation-duration:1s;
-webkit-animation-fill-mode:both;
// UTF8 Module
//
// Cleaner and modularized utf-8 encoding and decoding library for javascript.
//
// copyright: MIT
// author: Nijiko Yonskai, @nijikokun, nijikokun@gmail.com
(function (name, definition, context, dependencies) {
if (typeof context['module'] !== 'undefined' && context['module']['exports']) { if (dependencies && context['require']) { for (var i = 0; i < dependencies.length; i++) context[dependencies[i]] = context['require'](dependencies[i]); } context['module']['exports'] = definition.apply(context); }
else if (typeof context['define'] !== 'undefined' && context['define'] === 'function' && context['define']['amd']) { define(name, (dependencies || []), definition); }
else { context[name] = definition.apply(context); }
@aispin
aispin / Learning-Android
Created October 14, 2014 02:45
My Android App development merterials
android studio
1. http://code.tutsplus.com/tutorials/getting-started-with-android-studio--mobile-22958
tab navigation
1. http://www.101apps.co.za/articles/tab-navigation-tutorial.html
2. http://www.codeproject.com/Articles/678093/Fragments-Creating-a-Tabbed-Android-User-Interface
@aispin
aispin / Learning-Swift
Last active August 29, 2015 14:06
My IOS App development merterials
1. http://www.raywenderlich.com/74438/swift-tutorial-a-quick-start (免费,一个计算器app)
2. http://ios-blog.co.uk/tutorials/developing-ios-apps-using-swift-part-1/
原版本:http://jamesonquave.com/blog/developing-ios-apps-using-swift-tutorial-part-2/
http://jamesonquave.com/blog/tutorials/
### 使用TabBarController
1. http://makeapppie.com/2014/09/09/swift-swift-using-tab-bar-controllers-in-swift/
### 使用cocoapods
1. http://happy-coding.org/swift-and-cocoapods/
@aispin
aispin / git-update-in-mac
Last active August 29, 2015 14:06
Update mac's git using Homebrew
### Firstly
Install git via homebrew
```
brew --version
brew doctor
brew install git
```
@aispin
aispin / gist:a776a112ab277d7c852f
Created August 14, 2014 09:24
vim-chinese-support
"修改.vimrc文件,设置fileencodings
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
  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