Skip to content

Instantly share code, notes, and snippets.

Avatar

Vitali Olshevski olshevski

View GitHub Profile
@denblackstache
denblackstache / index.gs
Created January 9, 2023 12:53
NBG Fetch Currency AppScript
View index.gs
/**
* Fetch currency rate from
* @see https://nbg.gov.ge/en/monetary-policy/currency
* @param date Date
* @param currency USD, EUR or GBP
*/
function fetchGelCurrencyRate(date, currency) {
Logger.log(`fetchGelCurrencyRate with date: ${date}, currency: ${currency}`);
const toISODateString = date => `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}`;
const url = `https://nbg.gov.ge/gw/api/ct/monetarypolicy/currencies/en/json/?currencies=${currency.toUpperCase()}&date=${toISODateString(date)}`;
@gpeal
gpeal / ContributesApiCodeGenerator.kt
Last active February 13, 2023 11:30
Anvil Code Generator
View ContributesApiCodeGenerator.kt
package com.tonal.trainer.anvilcompilers
import com.google.auto.service.AutoService
import com.squareup.anvil.annotations.ContributesTo
import com.squareup.anvil.compiler.api.AnvilContext
import com.squareup.anvil.compiler.api.CodeGenerator
import com.squareup.anvil.compiler.api.GeneratedFile
import com.squareup.anvil.compiler.api.createGeneratedFile
import com.squareup.anvil.compiler.internal.asClassName
import com.squareup.anvil.compiler.internal.buildFile
@jemshit
jemshit / proguard-rules.pro
Last active February 22, 2023 22:58
Proguard Rules for Android libraries
View proguard-rules.pro
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
public *;
}
### RxJava, RxAndroid (https://gist.github.com/kosiara/487868792fbd3214f9c9)
-keep class rx.schedulers.Schedulers {
public static <methods>;