Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block revolc

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
leecade /
Last active Jun 2, 2016
staltz /
Last active Nov 19, 2019
The introduction to Reactive Programming you've been missing
kevin-smets /
Last active Nov 19, 2019
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)





zvving / CLLocation+Sino.h
Last active Jan 9, 2019
火星坐标系转换扩展。Earth(国外 WGS84), mars(国内 GCJ-02), bearPaw(百度 BD-09) 坐标系间相互转换
View CLLocation+Sino.h
// CLLocation+Sino.h
// Created by on 13-4-26.
// 火星坐标系转换扩展
// earth(国外 WGS84), mars(国内 GCJ-02), bearPaw(百度 BD-09) 坐标系间相互转换
// 未包含 mars2earth. 需要这个可参考
#import <CoreLocation/CoreLocation.h>
flypiggy / test.sml
Created Jan 24, 2013
change the assignment name then "$sml test.sml" to make test
View test.sml
use "assignment1.sml";
(* assert for test *)
fun assert (e: bool, message: string) =
let val prefix = "Testing [" ^ message ^ "]"
in if e then print( prefix ^ "----PASS\n")
else print(prefix ^ "----FAIL\n")
(* factroies for Q1-Q5 *)
cihancimen / string_contains_emoji
Created Nov 26, 2012
Check if an NSString contains an emoji character
View string_contains_emoji
- (BOOL)stringContainsEmoji:(NSString *)string {
__block BOOL returnValue = NO;
[string enumerateSubstringsInRange:NSMakeRange(0, [string length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock:
^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
const unichar hs = [substring characterAtIndex:0];
// surrogate pair
if (0xd800 <= hs && hs <= 0xdbff) {
if (substring.length > 1) {
const unichar ls = [substring characterAtIndex:1];
xxd / fileControl.h
Created May 13, 2012
Read,Write,List files in sandbox
View fileControl.h
// 把 图片 写入 沙盒
-(void)photoFile {
//此处首先指定了图片存取路径(默认写到应用程序沙盒 中)
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSString *uniquePath=[[paths objectAtIndex:0] stringByAppendingPathComponent:@"pin"];
BOOL blHave=[[NSFileManager defaultManager] fileExistsAtPath:uniquePath];
if (blHave) {
mranney / emoji_sad.txt
Created Jan 30, 2012
Why we can't process Emoji anymore
View emoji_sad.txt
From: Chris DeSalvo <>
Subject: Why we can't process Emoji anymore
Date: Thu, 12 Jan 2012 18:49:20 -0800
Message-Id: <>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
Jaybles / UIDeviceHardware.h
Created Oct 28, 2011
UIDeviceHardware - Determine iOS device being used
View UIDeviceHardware.h
// UIDeviceHardware.h
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
imathis / gist_tag.rb
Created Jun 15, 2011 — forked from chrisjacob/gist_tag.rb
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
View gist_tag.rb
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
@text = text
You can’t perform that action at this time.