Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View robertoestivill's full-sized avatar

Roberto Estivill robertoestivill

View GitHub Profile
@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:
@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
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 / 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
@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 / 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 / branchy.sh
Created July 17, 2017 11:15
Iterate over local git branches and prompt the user for deletion confirmation.
#!/bin/bash
CURRENT=$(git branch | grep "*" | cut -c3-)
printf "Your current branch is '$CURRENT'. Will be ignored.\n\n"
BRANCHES=$(git branch | cut -c3-)
BRANCHES=${BRANCHES[@]/$CURRENT}
for BRANCH in ${BRANCHES}
do
@robertoestivill
robertoestivill / gist:eec8d899d4d148d879b096de2f72f2ea
Last active April 29, 2017 22:34
android-things-panic-button
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>You just got your ass saved!</Say>
</Response>
@robertoestivill
robertoestivill / hide_apple_apps.sh
Last active April 8, 2018 10:13
Hide Apple apps
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
declare -a arr=(
"Calendar.app"
"Chess.app"
@robertoestivill
robertoestivill / launcher.sh
Last active November 7, 2019 18:45
Bash alternative to Franz
#!/bin/bash
open -a "Google Chrome" --new --args --new-window \
'https://tweetdeck.twitter.com' \
'https://web.whatsapp.com' \
'https://blastersystems.slack.com/' \
'https://www.messenger.com/' \
'https://web.telegram.org/' \
'https://web.skype.com' \
'https://hangouts.google.com/' \