Skip to content

Instantly share code, notes, and snippets.

kamimoo

Block or report user

Report or block kamimoo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am kamimoo on github.
  • I am kamimoo (https://keybase.io/kamimoo) on keybase.
  • I have a public key ASDhKaLbtiJHSNmJYoLmrtImdqffSe0FwuqhCBiOd9QejAo

To claim this, I am signing this object:

View htmlparser2.coffee
htmlParser = require('htmlparser2')
result = ''
selfClosingTags = ['img', 'br', 'hr']
parser = new htmlParser.Parser(
onopentag: (name, attribs) =>
result += "<#{name}"
for attr, val of attribs
if val.length
View post-merge
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
if [ -x "`which -s npm`" ]; then
echo "node is not installed"
exit 1
fi
cd "$(dirname ${BASH_SOURCE[0]})/../.."
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
@kamimoo
kamimoo / NSString+Replacement.m
Created Nov 21, 2014
JSのString.prototype.replace()で関数を渡すのと同等の処理
View NSString+Replacement.m
- (NSString *)stringByReplacingPattern:(NSString *)patternString usingBlock:(NSString *(^)(NSTextCheckingResult *match))replacer {
if (!replacer) {
return nil;
}
NSRegularExpression *regex = [NSRegularExpression
regularExpressionWithPattern:patternString
options:NSRegularExpressionAnchorsMatchLines
error:NULL];
You can’t perform that action at this time.