Skip to content

Instantly share code, notes, and snippets.

@santoxyz
santoxyz / fluid-android-prepare.sh
Last active June 1, 2021 11:46 — forked from derselbst/fluid-android-prepare.sh
Shell file to set up various environment variables to allow cross compilation for Android
#!/bin/bash
# Android cross-compile environment setup script for Glib
# Author : Zengwen Yuan
# Date : 2016-07-16
# License : Creative Commons Attribution-ShareAlike 4.0
# http://zwyuan.github.io/2016/07/17/cross-compile-glib-for-android/
#
# Modified by Tom Moebert to provide an Android cross compilation toolchain for fluidsynth 2.0
# Date: 2018-09-06
@ychescale9
ychescale9 / build.gradle.kts
Last active June 5, 2024 22:56
Customizing APK file name with new AGP variant APIs
android {
onVariantProperties {
val mainOutput = outputs.single { it.outputType == VariantOutputConfiguration.OutputType.SINGLE }
tasks.register<CreateRenamedApk>("createRenamedApkFor${name}") {
this.originalApkFolder.set(artifacts.get(ArtifactType.APK))
this.builtArtifactsLoader.set(artifacts.getBuiltArtifactsLoader())
this.newApkFolder.set(layout.buildDirectory.dir("outputs/renamed_apk/${[email protected]}"))
this.versionCode.set(mainOutput.versionCode)
this.versionName.set(mainOutput.versionName)
}
@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:
@RikkaW
RikkaW / gist:0ae7f51117768a03c6581c956d75958c
Last active November 28, 2024 01:01
insert general file with MediaStore
Context context = view.getContext();
ContentResolver cr = context.getContentResolver();
ContentValues values;
try {
// create a file for test
File file = new File(context.getFilesDir(), "1234568");
file.createNewFile();
try (OutputStream os = new FileOutputStream(file)) {
os.write("test".getBytes());
@atsushieno
atsushieno / Dockerfile
Created April 28, 2019 07:12
fluidsynth for Android docker build
FROM bitriseio/android-ndk
WORKDIR /usr/local/src
ENV ANDROID_NDK_PATH /opt/android-ndk
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
@hormesiel
hormesiel / Device.java
Last active May 29, 2024 11:47
How to get an Android device's serial number, visible to the user in "Settings > About phone/tablet/device > Status > Serial number".
import android.os.Build;
import java.lang.reflect.Method;
public class Device {
/**
* @return The device's serial number, visible to the user in {@code Settings > About phone/tablet/device > Status
* > Serial number}, or {@code null} if the serial number couldn't be found
*/
public static String getSerialNumber() {
@sdnts
sdnts / example.md
Last active January 10, 2023 20:50
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
using System.Threading.Tasks;
using Newtonsoft.Json;
using Refit;
using System.Net.Http;
using System;
namespace wms_xamarin
{
public class LoginApi
{
@odan
odan / xampp_php7_xdebug.md
Last active February 25, 2025 20:49
Installing Xdebug for XAMPP
@kosiara
kosiara / proguard-rules.pro
Created November 3, 2015 15:39
RxJava RxAndroid Proguard rules
#build.gradle
#
# compile 'io.reactivex:rxandroid:1.0.1'
# compile 'io.reactivex:rxjava:1.0.14'
# compile 'io.reactivex:rxjava-math:1.0.0'
# compile 'com.jakewharton.rxbinding:rxbinding:0.2.0'
# rxjava
-keep class rx.schedulers.Schedulers {
public static <methods>;