This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ARCWeakRef.h | |
// M9 | |
// | |
// Created by iwill on 2013-07-08. | |
// Copyright (c) 2013年 iwill. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# http://hints.macworld.com/article.php?story=20091003083125659 | |
function trash() { | |
for arg in "$@"; do | |
if [ -e "$PWD/$arg" ]; then | |
osascript -e "tell application \"Finder\" to delete POSIX file \"$PWD/$arg\"" &>/dev/null | |
elif [ -e "$arg" ]; then | |
osascript -e "tell application \"Finder\" to delete POSIX file \"$arg\"" &>/dev/null | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define OR ? : | |
#define NSStringFromValue(value) [@(value) description] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isNumber(x, object, bigint, string) { | |
let type = typeof x; | |
if (object && type == "object") { | |
x = x instanceof Number ? x.valueOf() : NaN; | |
type = typeof x; | |
} | |
else if (bigint && type == "bigint") { | |
x = x >= Number.MIN_SAFE_INTEGER && x <= Number.MAX_SAFE_INTEGER ? Number(x) : NaN; | |
type = typeof x; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simple JavaScript Inheritance | |
* By John Resig http://ejohn.org/ | |
* MIT Licensed. | |
*/ | |
// Inspired by base2 and Prototype | |
(function(){ | |
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; | |
// The base Class implementation (does nothing) | |
this.Class = function(){}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[method] | |
mm | |
[<#object#> <#method#>] | |
{block} | |
bb | |
[<#object#> <#method#>] | |
#pragma mark - | |
pp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# which and | |
function wa() { | |
which "$2" | xargs "$1" | |
} | |
export -f wa | |
# which and mate | |
function wamate() { | |
wa mate "$1" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
function repeat() { | |
if [[ $# < 2 ]]; then | |
echo "repeat: Too few arguments." | |
return 1 | |
else | |
n=$1 | |
shift | |
seq $n | xargs -I{} "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
html5doctor.com Reset Stylesheet | |
v1.6.1 | |
Last Updated: 2010-09-17 | |
Author: Richard Clark - http://richclarkdesign.com | |
Twitter: @rich_clark | |
*/ | |
html, body, div, span, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |