Skip to content

Instantly share code, notes, and snippets.

View neolee's full-sized avatar

Neo Lee neolee

View GitHub Profile
@neolee
neolee / gist:3403044
Created August 20, 2012 10:40
Homebrew on Mac OS X 10.8: Error building SBCL
Error log:
WARNING! Some of the contrib modules did not build successfully or pass
their self-tests. Failed contribs:"
sb-concurrency
==> Exit Status: 1
https://github.com/mxcl/master/blob/master/Library/Formula/sbcl.rb#L78
==> Build Environment
HOMEBREW_VERSION: 0.9.2
HEAD: ed127082d8e11debdba4c17fb63ea72e9a14c4ad
@neolee
neolee / TeXIt.tex
Created May 3, 2012 10:46
XeLaTeX Sample
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
% 以上设定默认使用 XeLaTeX 编译,并指定 Unicode 编码,供 TeXShop 自动识别
% XeLaTeX 示例
\documentclass[12pt]{article}
% XeTeX 配合 fontspec 可以非常方便的设置字体
@neolee
neolee / hack.sh
Created March 31, 2012 11:02 — forked from erikh/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
#
@neolee
neolee / gist:1167540
Created August 24, 2011 08:04
parseQueryString
- (NSDictionary *)parseQueryString:(NSString *)query {
NSMutableDictionary *dict = [[[NSMutableDictionary alloc] initWithCapacity:6] autorelease];
NSArray *pairs = [query componentsSeparatedByString:@"&"];
for (NSString *pair in pairs) {
NSArray *elements = [pair componentsSeparatedByString:@"="];
NSString *key = [[elements objectAtIndex:0] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *val = [[elements objectAtIndex:1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[dict setObject:val forKey:key];
@neolee
neolee / NSDictionary+QueryStringBuilder.h
Created August 24, 2011 08:02 — forked from mramsden/NSDictionary+QueryStringBuilder.h
Creating a query string from an NSDictionary.
#import <Foundation/Foundation.h>
@interface NSDictionary (QueryStringBuilder)
- (NSString *)queryString;
@end