Skip to content

Instantly share code, notes, and snippets.

View stanwu's full-sized avatar

Stan Ht. Wu stanwu

View GitHub Profile
@IulianaMitac
IulianaMitac / gist:334814ea633cc60613a4e5438cc7deb1
Last active May 9, 2023 12:13
Pairing android wear emulator with android handheld emulator
Android Studio 2.1
javac 1.8.0_92
Android SDK Platform-Tools 23.1
Android SDK Tools 25.1.3
Handheld AVD
Nexus 5 API 23
System image Android 6.0 with Google API CPU/ABI x86_64
Wear AVD
@stanwu
stanwu / drive.go
Created October 10, 2015 08:54
google drive list all of files with MD5 checksum
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
@stanwu
stanwu / pybrowser.py
Last active August 29, 2015 14:21 — forked from kklimonda/pybrowser.py
import sys
from gi.repository import Gtk, Gdk, WebKit
class BrowserTab(Gtk.VBox):
def __init__(self, *args, **kwargs):
super(BrowserTab, self).__init__(*args, **kwargs)
go_button = Gtk.Button("go to...")
go_button.connect("clicked", self._load_url)
self.url_bar = Gtk.Entry()
@bricef
bricef / AES.c
Last active March 4, 2023 11:29
A simple example of using AES encryption in Java and C.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* MCrypt API available online:
* http://linux.die.net/man/3/mcrypt
*/
#include <mcrypt.h>
@darktable
darktable / MiniJSON.cs
Created November 30, 2011 23:08
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining