Skip to content

Instantly share code, notes, and snippets.

View 9re's full-sized avatar

Taro Kobayashi 9re

View GitHub Profile
@9re
9re / init_android_sdk.sh
Created December 11, 2013 07:15
init android sdk
#!/bin/sh
curl -L -O http://dl.google.com/android/android-sdk_r22.3-linux.tgz
@9re
9re / list_sdks.sh
Created December 5, 2013 11:49
show available ios / simulator sdk
xcodebuild -showsdks|grep iphone|sed -e "s/.*-sdk //"
@9re
9re / local.properties
Created November 26, 2013 10:54
local properties for debug signed build
key.store=~/.android/debug.keystore
key.alias=androiddebugkey
key.store.password=android
key.alias.password=android
@9re
9re / osx.sh
Last active December 29, 2015 10:19
#!/bin/sh
OSX=`uname|grep Darwin`
if [ ! -z $OSX ]; then
echo "Darwin!"
else
echo "not!"
fi
@9re
9re / build.sh
Created November 22, 2013 12:55
apkname=$1
dirname=$2
apktool b $dirname $apkname.apk
zipalign -v 4 $apkname.apk ${apkname}-aligned.apk
jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -storepass android -keypass android -keystore ~/.android/debug.keystore ${apkname}-aligned.apk androiddebugkey
mv ${apkname}-aligned.apk $apkname.apk
@9re
9re / beatport_widget.js
Last active January 22, 2022 11:12
Beatport widget live demo: http://jsdo.it/9re/beatport_widget
(function($){
function Beatport(artistId) {
this.artistId = artistId;
}
Beatport.prototype.load = function load(container) {
fetchRelease(this.artistId, function (tracks) {
tracks.forEach(function (track) {
$(container).append(getBeatportPlayerEmbedCode(track));
});
@9re
9re / README.md
Last active February 5, 2020 14:03
list up rational numbers p such that sqrt(p), sqrt (p - 5), sqrt (p + 5) are all rational.

list up rational numbers p such that sqrt(p), sqrt (p - 5), sqrt (p + 5) are all rational.

*Main> take 2 answer
[1681 % 144,11183412793921 % 2234116132416]
@9re
9re / Google-Analytics-App-Tracking-SDK-revision-3-License.txt
Created April 18, 2013 11:11
Google Analytics App Tracking SDK, revision 3 License
Packages
- Google Analytics App Tracking SDK, revision 3
License
Terms and Conditions
This is the Android Software Development Kit License Agreement.
1. Introduction
@9re
9re / gist:5403128
Created April 17, 2013 09:54
get apk path
PackageManager pm = getPackageManager();
for (ApplicationInfo app : pm.getInstalledApplications(0)) {
Log.d("PackageList", "package: " + app.packageName + ", sourceDir: " + app.sourceDir);
}
@9re
9re / AndroidManifest.xml
Created April 4, 2013 10:16
BOOT_COMPLETE
...
<receiver android:name=".BootStrap" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
...