Skip to content

Instantly share code, notes, and snippets.

View robertoestivill's full-sized avatar

Roberto Estivill robertoestivill

View GitHub Profile
@robertoestivill
robertoestivill / main.kt
Last active May 24, 2018 12:11
Kotlin ReceiverChannel example with background and "UI" threads.
package testkotlin
import kotlinx.coroutines.experimental.channels.ReceiveChannel
import kotlinx.coroutines.experimental.channels.consumeEach
import kotlinx.coroutines.experimental.channels.produce
import kotlinx.coroutines.experimental.newFixedThreadPoolContext
import kotlinx.coroutines.experimental.newSingleThreadContext
import kotlinx.coroutines.experimental.runBlocking
import kotlinx.coroutines.experimental.withContext
import kotlin.coroutines.experimental.CoroutineContext
@robertoestivill
robertoestivill / md_colors.xml
Last active June 18, 2018 08:42
Material Design color palette for Android applications.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
References
- https://www.materialpalette.com/colors
- https://www.materialui.co/colors
- https://material-ui.com/style/color/
-->
@robertoestivill
robertoestivill / 686 snowboard fleece
Last active March 11, 2019 19:26
winter gear sale
686 (Burton sub-brand) snowboard fleece - Size L.
Water proof.
Used with signs of wear.
$10 eur
https://photos.app.goo.gl/vD1CfNGkUvcAk6S98
alias git-master='git checkout master'
alias git-add-commit='function _git-add-commit(){ git add -A "$1"; git commit -S -m "$2"; }; _git-add-commit'
alias git-undo='git reset HEAD~'
alias git-checkout-branch='git checkout'
alias git-checkout-tag='function _git-checkout-tag(){ git checkout tags/"$1"; }; _git-checkout-tag'
# Branch is created on both, local and remote
alias git-new-branch='function _git-new-branch(){ git checkout -b "$1"; git push -u origin "$1"; }; _git-new-branch'
alias git-new-tag='function _git-new-tag(){ git tag -a "$1" -m "$1"; }; _git-new-tag'
@robertoestivill
robertoestivill / reads
Last active June 5, 2019 19:46
Running f3 on my 128gb SanDisk Extreme UHS 3
$ f3read /Volumes/Untitled/
F3 read 7.1
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.
SECTORS ok/corrupted/changed/overwritten
Validating file 1.h2w ... 2097152/ 0/ 0/ 0
Validating file 2.h2w ... 2097152/ 0/ 0/ 0
Validating file 3.h2w ... 2097152/ 0/ 0/ 0
Validating file 4.h2w ... 2097152/ 0/ 0/ 0
@robertoestivill
robertoestivill / setup
Last active May 8, 2020 10:26
RAM disk + rsync
###############
# Step 0:
# Disclaimer
#
# RAM DISK ARE VOLATILE. YOU WILL LOOSE DATA IF POWER IS INTERRUPTED.
#
###############
# Step 1: