Skip to content

Instantly share code, notes, and snippets.

Avatar
🍃

Takao Chiba chibatching

🍃
View GitHub Profile
View CustomTabsHelper.kt
import android.app.Activity
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.net.Uri
import android.support.customtabs.CustomTabsClient
import android.support.customtabs.CustomTabsIntent
import android.support.customtabs.CustomTabsServiceConnection
@chibatching
chibatching / play_service_proj_builder.py
Last active Nov 26, 2016
Create eclipse library project from google play service aar in android sdk
View play_service_proj_builder.py
from distutils.spawn import find_executable
import os
import re
import sys
import subprocess
import zipfile
import tempfile
import shutil
@chibatching
chibatching / tinyPNG.py
Created Jun 19, 2015
Batch compress PNG images by using TinyPNG
View tinyPNG.py
"""
Batch compress PNG images by using TinyPNG
usage:
tinyPNG.py <key> <target-folder> <source-file>...
"""
import os
import glob
import sys
import re
import shutil
@chibatching
chibatching / resource_copy.py
Created Feb 13, 2015
Copy image files with dpi suffix (_xdpi, _hdpi etc..) to Android resource folder.
View resource_copy.py
"""
Copy image files with dpi suffix to Android resource folder
usage:
resource_copy.py <target-resource-folder> <source-file>...
"""
import os
import glob
import sys
import re
@chibatching
chibatching / OAuthPostHurlStack.java
Last active Feb 3, 2018
OAuth signed POST request with Volley + oauth-signpost
View OAuthPostHurlStack.java
public class OAuthPostHurlStack extends HurlStack {
private final OAuthConsumer mConsumer;
private ArrayList<String> mOauthSignedPosts = new ArrayList<>();
public OAuthPostHurlStack(OAuthConsumer consumer) {
mConsumer = consumer;
}
@Override
@chibatching
chibatching / qr_gen.py
Created Sep 26, 2014
QRcode generator for the access local test server
View qr_gen.py
"""
QRcode generator
usage:
qr_gen.py [-t] <url>
options:
-t Translate localhost or loopback address to host address
"""
import qrcode