Skip to content

Instantly share code, notes, and snippets.

@hisetu
hisetu / sign apk
Created July 21, 2020 14:27
sign apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore "your.jks" your.apk alias
@hisetu
hisetu / sonarqube-docker-compose.yml
Created July 18, 2020 11:42 — forked from Warchant/sonarqube-docker-compose.yml
docker-compose file to setup production-ready sonarqube
version: "3"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks:
@hisetu
hisetu / Android WebView
Created March 21, 2020 09:49
Android WebView
AOSP 的 WebView 預設使用com.android.webview
安裝Android System WebView (com.google.android.webview)
執行 App 使用的 WebView 元件仍是com.android.webview
@hisetu
hisetu / gist:4a19742a4221c3eeb93a37b5a223cf60
Created October 14, 2019 03:31
list third-party package
List<ApplicationInfo> apps = getPackageManager().getInstalledApplications(0);
for (int i=0; i < apps.size(); i++)
{
if ((apps.get(i).flags & ApplicationInfo.FLAG_SYSTEM) != 1)
{
//System app
}
}
@hisetu
hisetu / android_emulator.bat
Last active August 21, 2019 02:34
Start Android emulator by command
CALL %LOCALAPPDATA%\Android\sdk\emulator\emulator.exe -list-avds
@ECHO off
SET /P name=Enter Emulator Name:
CALL %LOCALAPPDATA%\Android\sdk\emulator\emulator.exe @%name%
PAUSE
@hisetu
hisetu / TransactionScopeRollbackDemo.cs
Created April 25, 2018 01:05 — forked from royosherove/TransactionScopeRollbackDemo.cs
Using TransactionScope to rollback database changes in tests
[TestFixture]
public class TrannsactionScopeTests
{
private TransactionScope trans = null;
[SetUp]
public void SetUp()
{
trans = new TransactionScope(TransactionScopeOption.Required);
}
[TearDown]
@hisetu
hisetu / xampp_php7_xdebug.md
Created September 24, 2017 06:12 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
using System.Threading.Tasks;
using Newtonsoft.Json;
using Refit;
using System.Net.Http;
using System;
namespace wms_xamarin
{
public class LoginApi
{
@hisetu
hisetu / xamarinandroidbindings.md
Created July 17, 2017 06:31 — forked from JonDouglas/xamarinandroidbindings.md
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME}{
private static volatile ${NAME} INSTANCE;
public static ${NAME} getInstance() {
if (INSTANCE == null) {
synchronized (${NAME}.class) {
if (INSTANCE == null) {
INSTANCE = new ${NAME}();