Skip to content

Instantly share code, notes, and snippets.

work smarter (but not sure)

Anton Vlasov whalemare

work smarter (but not sure)
Block or report user

Report or block whalemare

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f65b758f02e837d14fb85458a5716f13
firebase functions:config:set service_account="$(cat service-account.json)"
View Main.kt
* @since 2019
* @author Anton Vlasov - whalemare
class Main {
fun main(args: Array<String>) {
View keybindings.json
// Place your key bindings in this file to override the defaultsauto[]
"key": "cmd+q",
"command": "editor.action.showHover",
"when": "editorTextFocus"
"key": "cmd+w",
"command": "editor.action.smartSelect.expand",
whalemare /
Last active Aug 29, 2019
Fast install ESLint and Prettier
if [ -f "$file" ]
# all is ok
echo ""
cd ..
if [ -f "$file" ]
whalemare / index.js
Created Jul 15, 2019
Simple .sortBy implementation for JS
View index.js
function compare(x, y) {
return x > y
* @param {any[]} array list of items
* @param {() => boolean} f function selector
function sortBy(array, f) {
return array.sort((x, y) => compare(f(x), f(y)))
View Fragment.kt
class ProfileFragment : Fragment() {
val viewModel: ProfileViewModel by viewModel()
whalemare /
Created Apr 29, 2019
React Native doctor that can solve your problems
#!/usr/bin/env bash
# If you dont know what happened just start this script for automatically trying solve your problem.
# Clear all your build folders and dependencies.
# Install dependencies again
platform=$(echo "$platform" | tr '[:upper:]' '[:lower:]') # to lower string
echo "Moving to the root project folder"
whalemare /
Created Apr 15, 2019 — forked from hofnerb/
git remote set-url

Review and Change Remote URL

git remote -v
# View existing remotes

git remote set-url origin
# Change the 'origin' remote's URL

git remote add origin
whalemare / IxKotlin.kt
Created Feb 14, 2019 — forked from acrylic-origami/IxKotlin.kt
Rx operator implementations from the five major classes outlined in using Kotlin reactive channels
View IxKotlin.kt
import kotlin.collections.*
import org.reactivestreams.*
import kotlinx.coroutines.channels.*
import kotlinx.coroutines.reactive.*
import kotlinx.coroutines.*
import kotlin.coroutines.*
fun <T, U> Publisher<T>.debounce(timeout: Long, ctx: CoroutineContext) = GlobalScope.publish(ctx) {
var idx = 0;
View TextViewExt.kt
fun TextView.onTextChanged(handler: (text: CharSequence) -> Unit): TextWatcher {
val watcher = object : TextWatcher {
override fun afterTextChanged(editable: Editable?) {
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
override fun onTextChanged(text: CharSequence?, p1: Int, p2: Int, p3: Int) {
You can’t perform that action at this time.