Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Hank Bao hankbao

🎯
Focusing
Block or report user

Report or block hankbao

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
@hankbao
hankbao / Cargo.toml
Last active Aug 7, 2019
Simple pipe server
View Cargo.toml
[package]
name = "ipc-server"
version = "0.1.0"
authors = ["hankbao"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
futures = "0.1"
@hankbao
hankbao / AutoreleasePool.h
Last active May 16, 2019
Autorelease Pool which doesn't work...
View AutoreleasePool.h
//
// AutoreleasePool.h
//
// Created by Hank Bao
// Copyright (c) 2019 zTap studio. All rights reserved.
//
#ifndef AUTORELEASE_POOL_H
#define AUTORELEASE_POOL_H
View PracticalSocket.h
/*
* C++ sockets on Unix and Windows
* Copyright (C) 2002
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
View PracticalSocket.cpp
/*
* C++ sockets on Unix and Windows
* Copyright (C) 2002
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@hankbao
hankbao / Makefile
Last active Feb 21, 2018 — forked from lenew/Makefile
Realtek r8168 kernel module for OpenWRT or LEDE
View Makefile
#Download realtek r8168 linux driver from official site [http://www.realtek.com/downloads/downloadsView.aspx?PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3]
#Unpack source file
#Replace orginal Makefile with this file
#Put this source to 'package' folder of OpenWRT/LEDE SDK
#Build(make menuconfig, make defconfig, make)
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=r8168
View BreakOnMethod.py
'''
Break on Objective-C 's method using its address'
'''
import shlex
import lldb
import re
def breakonmethod(debugger, command, exe_ctx,result, internal_dict):
args=shlex.split(command)
Class=args[0]
Method=args[1]
@hankbao
hankbao / Makefile
Created Sep 10, 2017
Makefile for asm.js / WebAssembly
View Makefile
# Makefile for zlib
# Copyright (C) 1995-2010 Jean-loup Gailly.
# For conditions of distribution and use, see copyright notice in zlib.h
# To compile and test, type:
# ./configure; make test
# Normally configure builds both a static and a shared library.
# If you want to build just a static library, use: ./configure --static
# To use the asm code, type:
View antidebugging.m
//
// main.m
// antidebugging
//
// Created by Vincent Tan on 7/8/15.
// Copyright (c) 2015 Vincent Tan. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
@hankbao
hankbao / HopperVCppDemangler.py
Created Sep 3, 2017 — forked from thomasfinch/HopperVCppDemangler.py
A super crappy and kinda slow (it makes network calls!) Visual C++ demangler script for Hopper disassembler. Based on https://github.com/melomac/Hopper/blob/master/Demangle%20Swift.py, uses demangler.com
View HopperVCppDemangler.py
import urllib, urllib2
def demangle(symbol):
r = urllib2.Request('http://demangler.com/raw', urllib.urlencode({'input': symbol}))
response = urllib2.urlopen(r)
return response.read()
def main():
doc = Document.getCurrentDocument()
current = doc.getCurrentAddress()
View CMakeLists.txt
cmake_minimum_required(VERSION 3.2.2)
function(PARSE_CMAKEJS_PROPERTIES)
function(GET_VARIABLE INPUT_STRING VARIABLE_TO_SELECT OUTPUT_VARIABLE)
set(SEARCH_STRING "${VARIABLE_TO_SELECT}=\"")
string(LENGTH "${SEARCH_STRING}" SEARCH_STRING_LENGTH)
string(LENGTH "${INPUT_STRING}" INPUT_STRING_LENGTH)
string(FIND "${INPUT_STRING}" "${VARIABLE_TO_SELECT}=\"" SEARCH_STRING_INDEX)
You can’t perform that action at this time.