Skip to content

Instantly share code, notes, and snippets.

View thanksmister's full-sized avatar

Mister thanksmister

View GitHub Profile
package com.soenkerohde.net {
import com.adobe.crypto.MD5Stream;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.HTTPStatusEvent;
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import flash.events.SecurityErrorEvent;
import flash.filesystem.File;
@thorikawa
thorikawa / Top.java
Created June 6, 2011 14:04
Android DrmFramework Sample
package com.polysfactory.DrmFrameworkTest;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.app.Activity;
import android.drm.DrmManagerClient;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
@s9tpepper
s9tpepper / gist:1394507
Created November 25, 2011 21:57
modal styles
var css:CSSStyleDeclaration = FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration('global');
css.setStyle('modalTransparency', transparency);
css.setStyle('modalTransparencyColor', color);
css.setStyle('modalTransparencyBlur', blur);
css.setStyle('modalTransparencyDuration', duration);
@ksafranski
ksafranski / Common-Currency.json
Last active July 24, 2024 16:40
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@JakeWharton
JakeWharton / BaseActivity.java
Created July 6, 2012 01:17
Scoped event bus which automatically registers and unregisters with the lifecycle.
package com.squareup.example;
public abstract BaseActivity extends SherlockActivity {
private final ScopedBus scopedBus = new ScopedBus();
protected ScopedBus getBus() {
return scopedBus;
}
@Override public void onPause() {
@FiloSottile
FiloSottile / .ArmoryRPi.md
Created September 5, 2012 22:12
Building the Armory Bitcoin client for the Raspberry Pi

Armory on the RPi

Building the Armory Bitcoin client for the Raspberry Pi

This is how I got Armory (etotheipi/BitcoinArmory; http://bitcoinarmory.com/) cross-compiled for the Raspberry Pi.

This is a great way to keep an air-gapped offline wallet for only $30 dollars for the RPi (that you can also use for other things; experiment, it's awesome) and $7 for a Class 10 4GB SD card, really easy to keep in a safe and secret place.

Dependencies

@deltheil
deltheil / jsmn.sh
Created October 4, 2012 20:25
Android NDK basic example: build jsmn C parser w/ the Standalone Toolchain
# 1. Use the tools from the Standalone Toolchain
export PATH=/tmp/my-android-toolchain/bin:$PATH
export SYSROOT=/tmp/my-android-toolchain/sysroot
export CC="arm-linux-androideabi-gcc --sysroot $SYSROOT"
export AR=arm-linux-androideabi-ar
# 2. Clone the Github mirror
git clone git://github.com/noct/jsmn.git; cd jsmn
# 3. Build for the ARMv7 ABI
@jalcine
jalcine / AndroidManifext.xml
Created October 11, 2012 07:04 — forked from komamitsu/AndroidManifext.xml
Android Simple web server using NanoHTTPD (http://elonen.iki.fi/code/nanohttpd)
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
@johnkil
johnkil / FileUtils.java
Last active February 9, 2021 21:13
File Util's. Set of basic static final methods for working with the file system on Android OS.
import java.io.File;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.os.Environment;
import android.util.Log;
/**
* File Util's.
@pboos
pboos / MainActivity.java
Last active January 29, 2020 17:00
Sample code for ViewPager + PagerTabStrip.
package ch.pboos.android.sample.viewpager;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;