Skip to content

Instantly share code, notes, and snippets.

@ricalo
ricalo / .bashrc
Last active December 2, 2025 21:20
Use git-bash from Android Studio terminal
if [ ! -z "${IDE}" -a "${IDE}" == "AndroidStudio" ]; then
cd $OLDPWD;
fi
@ricalo
ricalo / emulator.md
Last active March 10, 2017 00:06
Start android emulator with virtualization on Linux

Linux with KVM and Google DNSs

 ~/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5_API_24 -qemu -enable-kvm -dns-servers 8.8.8.8,8.8.4.4 &

AOSP build

emulator -skindir ~/Android/Sdk/skins -skin nexus_5x
@ricalo
ricalo / reset.sh
Created March 2, 2016 17:48
Ubuntu no sound after restart
pulseaudio -k && sudo alsa force-reload
@ricalo
ricalo / gist:86dd494c3d254c19806f
Created March 19, 2016 16:43
Fixing RTL8723BE intermittent connection
echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf
@ricalo
ricalo / VinoDoNotRequireEncryption.sh
Created June 21, 2016 22:17
Vino (VNC), do not require encryption
gsettings set org.gnome.Vino require-encryption false
/usr/lib/vino/vino-server &
@ricalo
ricalo / todofix.sql
Created August 17, 2016 04:57
BigQuery - Get all todo: fix comments
SELECT
SUM(copies)
FROM
[bigquery-public-data:github_repos.contents]
WHERE
NOT binary
AND lower(content) CONTAINS 'todo: fix'
@ricalo
ricalo / updateTree.sh
Last active April 20, 2017 04:58
Update file permissions in Git. Useful when you have to upload scripts to your CI/CD
// source: http://stackoverflow.com/questions/10516201/updating-file-permissions-only-in-git
git ls-tree HEAD
git update-index --chmod=+x script.sh
git commit
git checkout script.sh
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@ricalo
ricalo / delete.bat
Created December 31, 2016 17:07
Delete stubborn files on Windows
chkdsk /f
takeown /f *.* /r /a /d y
@ricalo
ricalo / symlink.sh
Created February 8, 2017 22:17
Update symlink