Skip to content

Instantly share code, notes, and snippets.

View android10's full-sized avatar
👇
fernandocejas.com

Fernando Cejas android10

👇
fernandocejas.com
View GitHub Profile
@android10
android10 / doctl
Created December 24, 2018 16:37 — forked from rgodishela/doctl
Digital Ocean Command Line Interface
DOCTL
Installation
Option 1 – Download a Release from GitHub
Visit the Releases page for the doctl GitHub project.
https://github.com/digitalocean/doctl/releases
tar xf ~/doctl-1.4.0-linux-amd64.tar.gz
sudo mv ~/doctl /usr/local/bin
Configure
@android10
android10 / executeShellInGradle
Created January 9, 2019 17:02 — forked from rishabhmhjn/executeShellInGradle
Executing shell commands and getting output in gradle
def getVersionName = { ->
def hashStdOut = new ByteArrayOutputStream()
exec {
commandLine "git", "rev-parse", "--short", "HEAD"
standardOutput = hashStdOut
}
def buildNumberStdOut = new ByteArrayOutputStream()
exec {
commandLine 'echo', "$BUILD_NUMBER"
@android10
android10 / docker.md
Last active February 15, 2019 10:47
Docker useful commands

Stop all running containers.

docker stop $(docker ps -a -q)

Removes one or more images.

docker rmi my_image

Removes one or more images (with force).

docker rmi -f my_image

Kill all running containers.

@android10
android10 / pi-tips.md
Created March 12, 2019 08:54 — forked from rdmarsh/pi-tips.md
Clean up the Raspbian default build for the Raspberry Pi

Remove unused packages on Raspberry Pi

(this is worth looking at http://www.stefan-seelmann.de/wiki/rasperrypi-homeserver, which is basically this:

apt-get purge --auto-remove scratch debian-reference-en dillo idle3 python3-tk idle python-pygame python-tk lightdm gnome-themes-standard gnome-icon-theme raspberrypi-artwork gvfs-backends gvfs-fuse desktop-base lxpolkit netsurf-gtk zenity xdg-utils mupdf gtk2-engines alsa-utils  lxde lxtask menu-xdg gksu midori xserver-xorg xinit xserver-xorg-video-fbdev libraspberrypi-dev libraspberrypi-doc dbus-x11 libx11-6 libx11-data libx11-xcb1 x11-common x11-utils lxde-icon-theme gconf-service gconf2-common

)

Warning: this will probably break something. If you need sound, don't remove the "alsa" packages

sudo apt-get --yes purge xserver-common x11-xfs-utils x11-xserver-utils xinit libsmbclient blt gvfs gvfs-backends gvfs-daemons gvfs-fuse idle idle-python2.7 idle-python3.2 idle3 libaudio2 libice6 liblightdm-gobject-1-0 libobrender27 libpulse0 libqt4-svg libqt

@android10
android10 / oh-my-zsh-powerlevel9k-theme.md
Last active March 10, 2024 10:53
oh-my-zsh with PowerLevel9k on Arch Linux

Attention: This is DEPRECATED in favor of PowerLevel10K, I wrote an article about it:

Install oh-my-zsh with powerlevel9k theme on Arch Linux

This gist aims to facilitate the switching from bash to zsh as our defaut shell. We will be using oh-my-zsh with the powerful theme: Powerlevel9k. You will find all the links below. This process applies mainly for Arch Linux, but can be setup for any other distro (in theory :)). I'm also using Gnome Terminal and pacaur as package manager.

@android10
android10 / archlinux-issues.md
Last active May 13, 2023 01:07
Arch Linux Troubleshooting - Also other distros
@android10
android10 / install_pacaur.sh
Last active February 16, 2024 03:52
SCRIPT to install Pacaur on Arch Linux: https://wiki.archlinux.org/index.php/AUR_helpers
#ATTENTION: Check the Troubleshooting items below if you have problems, you can also visit my website where I wrote about it.
# LINK: https://fernandocejas.com/blog/engineering/2020-12-28-install-arch-linux-full-disk-encryption/#aur-helper
#!/bin/bash
#Make sure the system is up to date.
sudo pacman -Syu --noconfirm
@android10
android10 / archlinux-larger-font-console.md
Last active February 5, 2023 09:33
Install larger (and cooler) font on Arch Linux Console: https://wiki.archlinux.org/index.php/Linux_console#Fonts
@android10
android10 / AndroidVersionizer.kt
Last active November 27, 2020 12:51
Android Version Code Generator
//Code
package com.fernandocejas.android
import java.time.*
class Versionizer(private val localDateTime: LocalDateTime = LocalDateTime.now()) {
val versionCode = generateVersionCode()
private fun generateVersionCode(): Int {
@android10
android10 / gnome-start.sh
Created September 27, 2021 19:38
Start Gnome Session from Command Line
XDG_SESSION_TYPE=wayland dbus-run-session gnome-session