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
/* | |
* h264_sps_parser.h | |
* | |
* Copyright (c) 2014 Zhou Quan <[email protected]> | |
* | |
* This file is part of ijkPlayer. | |
* | |
* ijkPlayer is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either |
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/python | |
#coding:utf-8 | |
import lldb | |
import commands | |
import optparse | |
import shlex | |
import re | |
# 获取ASLR偏移地址 | |
def get_ASLR(): | |
# 获取'image list -o'命令的返回结果 |
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
static char *url_escape(char *path, int len) { | |
char *org_path = strdup(path); | |
memset(path, 0, len); | |
char *enc = path; | |
for (char *s = org_path; *s && (enc - path < len - 3); s++) { | |
if (strchr("!*'();:@&=+$,/?%%#[]", *s) != NULL) { | |
sprintf(enc, "%%%02X", *s); | |
} else { | |
sprintf(enc, "%c", *s); | |
} |
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; |
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
#!/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
#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
-- 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
#!/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
#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) | |
{ |