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 / 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 / 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 / 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 / vpn.sh
Created August 20, 2018 15:19
LINUX: Script to facilitate running openvpn from the command line, especially when a Linux/Unix client is used with Access Server, the Access Server is unable to alter the DNS settings on the client in question causing issues on host resolving.
# -----------------------------------------------
# BEFORE USING THIS SCRIPT
# -----------------------------------------------
# 1 - Create a file in /etc/<yourpassfile>.pass which contains the vpn private key password.
# 2 - Set permission for the file: 'sudo chmod 600 /etc/<yourpassfile>.pass' - Owner can read and write.
# 3 - Create an alias in your .bashrc or bash_profile: alias vpn="sudo sh <path to your script>".
# 4 - Set the value of the variable OVPN_FILE_PATH with the path of the .ovpn file.
# 5 - Set the value of the variable OVPN_PRIVATE_KEY_FILE_PATH with the path of the created file in step #1: /etc/<yourpassfile>.pass
# 6 - OPTIONAL: avoid password when executing the script, add this to /etc/sudoers '<your username> ALL=(ALL:ALL) NOPASSWD:<path to your script>'
@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 / install_ubuntu_fonts_rehat.md
Last active November 24, 2022 23:05
Install Ubuntu Fonts on RedHat/Fedora Linux

1 - Open the terminal and type below given command

cd /root
yum install wget       (you can skip this step if wget is already installed)
wget https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-0.83.zip (check the newest version)

2 - Check if the directory /usr/share/fonts exist. If the fonts directory do not exist,you can create yourself.

@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 / archlinux-issues.md
Last active May 13, 2023 01:07
Arch Linux Troubleshooting - Also other distros
@android10
android10 / build.gradle
Last active August 29, 2023 14:31
Compile and launch android app from the command line.
task deployDebug(type: Exec, dependsOn: 'app:installDebug') {
def rootDir = project.rootDir
def localProperties = new File(rootDir, "local.properties")
if (localProperties.exists()) {
Properties properties = new Properties()
localProperties.withInputStream {
inputStream -> properties.load(inputStream)
}
def sdkDir = properties.getProperty('sdk.dir')
def adb = "$sdkDir/platform-tools/adb"
@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