Skip to content

Instantly share code, notes, and snippets.

View hankbao's full-sized avatar
🧠
use it or lose it

Hank Bao hankbao

🧠
use it or lose it
View GitHub Profile
@hankbao
hankbao / gist:d75294e6f44e0875ac6940b038d7047d
Created February 2, 2023 07:59 — forked from uhfx/gist:3922268
Twitter公式/非公式クライアントのコンシューマキー

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@hankbao
hankbao / aac_hardware_decoder_detect.m
Last active February 1, 2023 09:10
Using AudioFormat to check the availability of the AAC hardware encoder.
// Check this: https://developer.apple.com/library/content/qa/qa1663/_index.html
Boolean IsAACHardwareEncoderAvailable(void)
{
Boolean isAvailable = false;
OSStatus error;
// get an array of AudioClassDescriptions for all installed encoders for the given format
// the specifier is the format that we are interested in - this is 'aac ' in our case
UInt32 encoderSpecifier = kAudioFormatMPEG4AAC;
UInt32 size;
@hankbao
hankbao / services-start.sh
Created March 2, 2022 10:42 — forked from Jimmy-Z/services-start.sh
multi SSID with VLAN script, for ASUS AC86U with merlin
#!/bin/sh
# multi SSID with VLAN script, for ASUS AC86U with merlin
#
# setup before hand:
# set "router" to "AP Mode"
# this will put all ports and wireless in br0
# create 2 guest network
# enable Administration => System => Enable JFFS custom scripts and configs
# put this script in /jffs/scripts/, name should be "services-start"
//
// 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"
package main
import (
"fmt"
"sync"
"time"
)
type Fetcher interface {
// Fetch returns the body of URL and
@hankbao
hankbao / sideproject_marketing_checklist.md
Created August 14, 2017 05:33
The Side Project Marketing Checklist
layout title permalink
checklist_page
The Side Project Marketing Checklist
/marketing-checklist/

Pre-Launch

Market Research

@hankbao
hankbao / Cargo.toml
Last active August 7, 2019 04:26
Simple pipe server
[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 13:11
Autorelease Pool which doesn't work...
//
// AutoreleasePool.h
//
// Created by Hank Bao
// Copyright (c) 2019 zTap studio. All rights reserved.
//
#ifndef AUTORELEASE_POOL_H
#define AUTORELEASE_POOL_H
@hankbao
hankbao / PracticalSocket.cpp
Created May 5, 2019 03:34 — forked from ardeshir/PracticalSocket
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 / PracticalSocket.h
Created May 5, 2019 03:34 — forked from ardeshir/PracticalSocket.h
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,