Skip to content

Instantly share code, notes, and snippets.

View iwill's full-sized avatar
Growing Well 🌱🌱

Míng iwill

Growing Well 🌱🌱
View GitHub Profile
@iwill
iwill / newbash.sh
Created March 25, 2014 02:26
newbash
# new bash script and mate
function newbash() {
if [[ ! -f "$1" ]]; then
echo '#!/bin/bash' > "$1"
fi
if [[ -f "$1" ]]; then
chmod +x "$1"
mate "$1"
fi
}
//
// NSObject+Blocks.h
// Filemator
//
// Created by Zachary Waldowski on 4/12/11.
// Copyright 2011 Dizzy Technology. All rights reserved.
//
@interface NSObject (Blocks)
@iwill
iwill / javascript_resources.md
Created May 28, 2014 10:41 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@iwill
iwill / css_resources.md
Created May 28, 2014 10:42 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

#The Great Firewall (GFW) Contributors List

注:数据来源为 dblp 和 cndblp, 下面括号中的数字表示 dblp 中显示的跟方滨兴合作论文的数量

###Binxing Fang (方滨兴)

中国工程院院士,北京邮电大学教授,中国科学院计算技术研究所网络方向首席科学家
http://en.wikipedia.org/wiki/Fang_Binxing

Objective-C Coding Convention and Best Practices

Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.

This document is mainly targeted toward iOS development, but definitely applies to Mac as well.

Operators

NSString *foo = @"bar";
@iwill
iwill / jquery.and.js
Last active September 4, 2015 12:14
$.fn.and
/*!
* jQuery plugin - jquery.and.js v1.1
* http://github.com/iwill/
*/
(function($) {
$.fn.and = function(selector, context) {
return $.merge(this.pushStack(this), $(selector, context));
};
})(jQuery);
@iwill
iwill / jquery.addEventType.js
Last active September 4, 2015 12:14
$.addEventType & $.fn.addEventType
/*!
* jQuery plugin - jquery.addEventType.js v1.0
* http://github.com/iwill/
*/
(function($) {
$.addEventType = $.fn.addEventType = function(eventType) {
(this.fn || this)[eventType] = function(handler) {
return handler ? this.bind(eventType, handler) : this.trigger(eventType);
};
return this;
@iwill
iwill / UIColor+.h
Created May 5, 2011 17:30
Objective-C UIColor - inverseColor
//
// UIColor+.h
// iTest
//
// Created by iwill on 11-03-09.
// Copyright 2011 iwill. All rights reserved.
//
#import <Foundation/Foundation.h>
@iwill
iwill / nodejs.sh
Last active October 12, 2015 15:28
JSON Parsing and Editing, run Javascript Function and Statements in Shell via Node.js
#!/bin/bash
# @see https://www.npmjs.org/package/json
## nodejs [js-statement ...] js-expression
function nodejs() {
local statements=""
while [[ $# > 1 ]]; do
statements="${statements:+$statements; }$1"
shift