Skip to content

Instantly share code, notes, and snippets.

View yyfrankyy's full-sized avatar

Frank Xu yyfrankyy

View GitHub Profile
@yorkxin
yorkxin / rfc6750.md
Created September 17, 2013 07:54
RFC 6750 in Markdown - Edited from http://tools.ietf.org/rfc/rfc6750.txt
Internet Engineering Task Force (IETF)                          M. Jones
Request for Comments: 6750                                     Microsoft
Category: Standards Track                                       D. Hardt
ISSN: 2070-1721                                              Independent
                                                            October 2012

The OAuth 2.0 Authorization Framework: Bearer Token Usage

Abstract

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@bjhomer
bjhomer / UIWebView+AccessoryHiding.m
Created March 16, 2012 05:03
Hiding the inputAccessoryView of a UIWebView
#import <objc/runtime.h>
#import <UIKit/UIKit.h>
@interface UIWebView (HackishAccessoryHiding)
@property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView;
@end
@implementation UIWebView (HackishAccessoryHiding)
static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView";
@DmitrySeredinov
DmitrySeredinov / recipe-ios.sh
Created March 5, 2012 19:07 — forked from niklassaers/recipe-ios.sh
Compile protobuf 2.4.1 on iOS 5
export ARCH=arm-apple-darwin10
export ARCH_PREFIX=${ARCH}-
export PLATFORM=iPhoneOS
export SDKVER=5.0
export DEVROOT=/Developer/Platforms/${PLATFORM}.platform/Developer
export SDKROOT="$DEVROOT/SDKs/${PLATFORM}$SDKVER.sdk"
export PKG_CONFIG_PATH="$SDKROOT/usr/lib/pkgconfig:$DEVROOT/usr/lib/pkgconfig"
export AS="$DEVROOT/usr/bin/as"
export ASCPP="$DEVROOT/usr/bin/as"
@santosh79
santosh79 / twitter-oauth.js
Created March 3, 2012 07:04
Twitter OAuth with node-oauth for node.js+express
var express = require('express');
var sys = require('util');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = process.env['TWITTER_CONSUMER_KEY'];
var _twitterConsumerSecret = process.env['TWITTER_CONSUMER_SECRET'];
console.log("_twitterConsumerKey: %s and _twitterConsumerSecret %s", process.env['TWITTER_CONSUMER_KEY'], process.env['TWITTER_CONSUMER_SECRET']);
@p01
p01 / LICENSE.txt
Last active March 9, 2024 13:40 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("")
base = alphabet.length
exports.encode = (i) ->
return alphabet[0] if i is 0
s = ""
while i > 0
s += alphabet[i % base]
i = parseInt(i / base, 10)
/**
Copyright: (c) SAEKI Yoshiyasu
License : MIT-style license
<http://www.opensource.org/licenses/mit-license.php>
last updated: 2011/05/21
**/
#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
@yyfrankyy
yyfrankyy / console.js
Created May 9, 2011 02:21
Overwrite Global Console
// overwrite global console based on kissy
//
// chrome 的 console 不能转移this,即不能call或者apply到其他分组上
// http://code.google.com/p/chromium/issues/detail?id=48662
// http://stackoverflow.com/questions/5133649/alias-to-chrome-console-log
//
// firefox 不能覆写console对象,只定义了Getter,直接覆盖方法属性
//
// 注意有些方法不完全兼容
// 比如console.profile/profileEnd在IE的表现跟