Skip to content

Instantly share code, notes, and snippets.

@MrTact
MrTact / RetrofitClient.kt
Last active Apr 29, 2019
Object wrapper to easily create a retrofit client in Kotlin
View RetrofitClient.kt
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.module.SimpleModule
import com.fasterxml.jackson.module.kotlin.KotlinModule
import retrofit2.Retrofit
import retrofit2.converter.jackson.JacksonConverterFactory
/**
* @return A callable instance of a retrofit client based on the provided API class
*
* @param baseUrl: The base URL for the api host
@MrTact
MrTact / LogText.kt
Last active Jan 11, 2019
Easily log some text to a file in Kotlin
View LogText.kt
File("log.txt").printWriter().use { out ->
params.list.forEach(out::println)
}
View extract_tampermonkey_script.py
#!/usr/bin/env python
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>"
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf"
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/"
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/"
import leveldb
import sys
import re
You can’t perform that action at this time.