This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "FMDatabase.h" | |
@interface FMDatabase (UserVer) | |
@property (nonatomic) int userVer; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.xcode_ramdisk.agent</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>xcode_ramdisk.sh</string> | |
<string>start</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
void oc_dump(uint8_t *buf, size_t len) | |
{ | |
int i; | |
char *c; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "NSData+OADataHelpers.h" | |
@implementation NSData (OADataHelpers) | |
- (NSString*) UTF8String | |
{ | |
// First we try strict decoding to avoid iconv overhead when not needed (majority of cases). | |
NSString* str = [[[NSString alloc] initWithData:self encoding:NSUTF8StringEncoding] autorelease]; | |
if (!str) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env lua | |
-- http://www.jianshu.com/p/92a041b1b825 | |
obj_tbl = {} -- {[3]={file, module}} | |
syb_tbl = {} -- {[3]=47} | |
filter_tbl = nil -- {'Test.o'} | |
appname = nil | |
function process_object(line) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- make xcode work on my iPhone | |
filename = arg[1] | |
mycodesign = "iPhone Developer: jie zhao (BF2E4X5CV7)" | |
if not string.find(filename, "project.pbxproj$") then | |
print("Usage: "..arg[0].." project.pbxproj") | |
os.exit(1) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController | |
- (void)viewDidLoad { | |
[super viewDidLoad]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ssh -p 2222 root@localhost "/sbin/hfs_uti /dev/rdisk0s2s1 cat /.journal" > my.journal | |
ssh -p 2222 root@localhost "/sbin/hfs_uti /dev/rdisk0s1s2 cat /.journal" > my.journal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf8 -*- | |
# !/usr/bin/env python | |
__author__ = 'fengxing' | |
__date__ = '2012-1-18 20:13' | |
import sys | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create by annidy | |
// 2016-05-13 | |
#include <stdio.h> | |
#include <utlist.h> | |
#include <string.h> | |
#include <stdlib.h> | |
struct TreeNode { | |
int val; | |
struct TreeNode *left; |