Skip to content

Instantly share code, notes, and snippets.

View olshevski's full-sized avatar
🪄
shellcasting

Vitali Olshevski olshevski

🪄
shellcasting
View GitHub Profile
@denblackstache
denblackstache / index.gs
Created January 9, 2023 12:53
NBG Fetch Currency AppScript
/**
* 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 12, 2024 20:10
Anvil Code Generator
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 April 21, 2024 04:08
Proguard Rules for Android libraries
# 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>;