Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am hkbenchan on github.
  • I am hkbenchan (https://keybase.io/hkbenchan) on keybase.
  • I have a public key ASAyS4HnzhAI3sMDjuArgP1Egx7vd21l6Vskn4DphuBfpgo

To claim this, I am signing this object:

@hkbenchan
hkbenchan / std_log_to_android_log.c
Created June 21, 2016 16:38
A helper function used in C for passing all stdout and stderr to android_log (logcat)
/**
* Referenced from: https://codelab.wordpress.com/2014/11/03/how-to-use-standard-output-streams-for-logging-in-android-apps/
*/
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#include <android/log.h>
@hkbenchan
hkbenchan / build.sh
Created April 13, 2016 14:58
Basic nodejs project setup
#!/bin/bash
echo "Kickstart building scripts, step 1: check if git and npm exists"
if [[ -z `which git` ]]; then
#statements
echo "Missing git, exit"
exit 1
elif [[ -z `which npm` ]]; then
#statements
echo "Missing npm, exit"