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 / 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 / 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 / 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 / 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 / xps-9370.md
Created May 30, 2018 07:31 — forked from greigdp/xps-9370.md
Dell XPS 13 (9370) Archlinux Install Notes

Install Notes - Dell XPS 13 (9370) 2018

The laptop works well on Archlinux. A few notes based on the installation guide for the previous version.

Intel GPU Power Saving

Per the Arch wiki, more power can be saved by creating /etc/modprobe.d/i915.confwith the following content:

options i915 modeset=1 enable_rc6=1 enable_fbc=1 enable_guc_loading=1 enable_guc_submission=1 enable_psr=1
@android10
android10 / [FEDORA] gitkraken
Last active November 13, 2019 18:59 — forked from aelkz/[FEDORA] gitkraken
How to install gitkraken on Fedora/RedHat + launcher icon
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# copy the downloaded file into /opt directory
cp gitkraken-amd64.tar.gz /opt/gitkraken
cd /opt
@android10
android10 / pr.md
Created October 27, 2017 10:16 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: