Skip to content

Instantly share code, notes, and snippets.

View 0xSG's full-sized avatar
💻
ᴡᴏʀᴋ 🎧

ѕσσяуα gαηgαяαנ 0xSG

💻
ᴡᴏʀᴋ 🎧
View GitHub Profile
@0xSG
0xSG / gist:2c9c5682cceaf0efc11203755bb6abbc
Created May 2, 2019 16:25
APP NAME ON FLAVORS FROM RES>STRING
android{
productFlavors {
freeVersion {
applicationId "com.atomtray.android.timereminder.freeVersion"
resValue "string", "override_name", "Free Version"
}
proVersion {
applicationId "com.atomtray.android.timereminder.proVersion"
resValue "string", "override_name", "Pro Version"
@alexathylane
alexathylane / iOS Universal Links Support Checklist.md
Last active August 8, 2024 09:35
iOS Universal Links Support Checklist
@wavezhang
wavezhang / java_download.sh
Last active April 24, 2025 16:32
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@Tetr4
Tetr4 / ForceCacheOrNetwork.java
Last active February 1, 2020 05:17
How to force a cached or network response on Android with Retrofit + OkHttp
OkHttpClient okHttpClient = new OkHttpClient();
try {
int cacheSize = 10 * 1024 * 1024 // 10 MiB
Cache cache = new Cache(getCacheDir(), cacheSize);
okHttpClient.setCache(cache);
} catch (IOException e) {
Log.e(TAG, "Could not set cache", e);
}
// Forces cache. Used for cache connection
@JMPergar
JMPergar / ScrollViewWithMaxHeight.java
Created November 5, 2014 13:28
ScrollView that can be configured with max height
public class ScrollViewWithMaxHeight extends ScrollView {
public static int WITHOUT_MAX_HEIGHT_VALUE = -1;
private int maxHeight = WITHOUT_MAX_HEIGHT_VALUE;
public ScrollViewWithMaxHeight(Context context) {
super(context);
}
@barnabyc
barnabyc / routes.js
Last active April 20, 2025 02:20
Aviator/React example
import Aviator from 'vendor/aviator';
import ServerRouteTarget from 'route_targets/server_route_target';
let Routes = {
/**
Call this method `Routes.dispatch` to start routing.
@method dispatch
@param {Object} targets
@example { 'nameOfMyRouteTarget': instanceOfMyRouteTarget }
@ogrrd
ogrrd / dnsmasq OS X.md
Last active April 3, 2025 16:56
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)