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 / linux-battery-notifier.py
Last active December 17, 2023 20:30
Tiny Python script for Linux Users to notify when Battery Level is low. Use it with a cronjob
#!/usr/bin/env python3
"""
This script aims to alert when the battery
reaches a critical level in the system.
"""
import os
CRITICAL_BATTERY_PERCENTAGE = 8
@android10
android10 / ranger-cheatsheet.md
Last active October 15, 2023 13:19 — forked from heroheman/ranger-cheatsheet.md
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@android10
android10 / gammastep.sh
Created November 18, 2022 20:15 — forked from quangdinh/gammastep.sh
Sway / Waybar / Wofi / Swaylock config & styles
#!/usr/bin/env bash
pid=$(pgrep gammastep)
if [[ $1 = "toggle" ]]; then
if pgrep -x "gammastep" > /dev/null; then
kill -9 $(pgrep -x "gammastep");
else
gammastep -O ${GAMMASTEP_NIGHT:-3500} &
fi
@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
@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 / 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 / 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-issues.md
Last active May 13, 2023 01:07
Arch Linux Troubleshooting - Also other distros
@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 / 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