Skip to content

Instantly share code, notes, and snippets.

revolc

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
leecade / 10.11_troubleshooting.md
Last active Jun 2, 2016
10.11_troubleshooting
View 10.11_troubleshooting.md
@staltz
staltz / introrx.md
Last active Jul 20, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active Jul 20, 2019
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)
View iterm2-solarized.md

Default

Default

Powerlevel10k

Powerlevel10k

@zvving
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 i0xbean@gmail.com on 13-4-26.
// 火星坐标系转换扩展
//
// earth(国外 WGS84), mars(国内 GCJ-02), bearPaw(百度 BD-09) 坐标系间相互转换
// 未包含 mars2earth. 需要这个可参考 http://xcodev.com/131.html
#import <CoreLocation/CoreLocation.h>
@flypiggy
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")
end
(* factroies for Q1-Q5 *)
@cihancimen
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
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
mranney / emoji_sad.txt
Created Jan 30, 2012
Why we can't process Emoji anymore
View emoji_sad.txt
From: Chris DeSalvo <chris.desalvo@voxer.com>
Subject: Why we can't process Emoji anymore
Date: Thu, 12 Jan 2012 18:49:20 -0800
Message-Id: <AE459007-DF2E-4E41-B7A4-FA5C2A83025F@voxer.com>
--Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
@Jaybles
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
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)
super
@text = text
You can’t perform that action at this time.