Skip to content

Instantly share code, notes, and snippets.


Hank Bao hankbao

View GitHub Profile
gdianaty / cmakejs.cmake
Last active Jul 14, 2020
CMake.js Inclusion Function for ordinary CMake
View cmakejs.cmake
# Authored by Graham Dianaty for Bitlogix Technologies. Based on code from Rene Hollander. ==========//
find_program(CMAKEJS "cmake-js")
find_program(NPM "npm")
# first, check if we have NPM:
message(VERBOSE "NPM found.")
message(FATAL_ERROR "NPM not found. This project requires Node.js")
ssokolow /
Created Mar 4, 2019
A one-off script for converting a specific dump of the SDL wiki into a Dash/Zeal docset... in case it's useful to someone
#!/usr/bin/env python
"""Quick script to generate a Dash/Zeal docset from the SDL 2 wiki.
- Python 2.x (3.x may work, but it's untested)
- LXML (for parsing the non-XML HTML used in the pages)
- Pillow (for converting favicon.ico into icon.png)

Frontend Masters: AWS for Frontend Engineers

You should have the following completed on your computer before the workshop:

  • Install the AWS CLI.
  • Have Node.js installed on your system. (Recommended: Use nvm.)
    • Install yarn with brew install yarn.
  • Create an AWS account. (This will require a valid credit card.)
  • Create a Travis CI account. (This should be as simple as logging in via GitHub).
goldengrape /
Created Nov 20, 2017
# coding: utf-8
# # 持续训练
# 问题提出: 如果人脸识别在使用中发现准确率并不够高, 是否可以继续改进? 如何在已有的基础之上继续改进?
# 解决方法: 建立并联的判别神经网络, 将A人脸的128位编码和待测人脸的128位编码作为输入, 二值判别输出
# * 路径A: 计算二阶范数距离, 并以原题目中的阈值作为分界, 形成输出
# * 路径B: 待训练神经网络, 早期时参数值都很小, 因此输出值也很小, 但可被训练.
Proteas / xnu-4570.1.46-arm64-steps.txt
Created Oct 9, 2017
steps to build arm64 version of xnu-4570.1.46
View xnu-4570.1.46-arm64-steps.txt
Following are my steps to build the ARM64 version of xnu-4570.1.46, hope this is helpfull for saving time.
1. Use Xcode 9.0
2. Preparation is same as macOS, and there is a guide:
3. There is an ARM64 version libfirehose:
4. Copy and edit the ARM64 config(CFLAGS, LDFLAGS) from darwin-on-arm/xnu to your target project
5. Example CFLAGS: -Darm64 -DARM64 -D__arm64__ -D__ARM64__ -DLP64 -DCONFIG_EMBEDDED -mkernel -DARM64_BOARD_CONFIG_T8011=1
6. Fix compiling stage errors by directly importing the missing headers or editing the code
7. Fix linking stage errors by implementing place holder funcitons for: chudxnu_cpu_alloc, etc
8. If missing symbol __divti3 in linking stage, get the runtime from llvm.
lenew / Makefile
Created Aug 13, 2017
realtek r8168 driver module for OpenWRT or LEDE
View Makefile
#Download realtek r8168 linux driver from official site []
#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)/
include $(INCLUDE_DIR)/
inamiy /
Last active Jun 20, 2020
React & Elm inspired frameworks in Swift
View url-schemes-settings-ios.mkd


Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.


  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
mdo /
Last active Aug 1, 2020
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

You can’t perform that action at this time.