Skip to content

Instantly share code, notes, and snippets.

#define NSNullObjects @[@"",@0,@{},@[]]
@interface NSNull (InternalNullExtention)
@end
@implementation NSNull (InternalNullExtention)
@implementation WeChatView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
UIImageView *logoImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo.png"]];
logoImageView.frame = CGRectMake(.0f, .0f, 50.0f, 50.0f);
self.backgroundColor = [UIColor grayColor];
[self addSubview:logoImageView];
require 'formula'
class Tsocks < Formula
# The original is http://tsocks.sourceforge.net/
# This GitHub repo is a maintained fork with OSX support
homepage 'http://github.com/pc/tsocks'
head 'https://github.com/pc/tsocks.git'
depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3
@gluttony
gluttony / AssembleR.java
Created April 23, 2011 16:22
Read R file of an android project
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;
public class AssembleR {
public static Map<Integer, String> assemble() {
Map<Integer, String> rMap = new HashMap<Integer, String>();
for (Class c : R.class.getClasses()) {
String innerClassName = c.getName().split("\\$")[1];