Skip to content

Instantly share code, notes, and snippets.

View Caleb9's full-sized avatar
🍺

Piotr Karasiński Caleb9

🍺
View GitHub Profile
@Caleb9
Caleb9 / apt-install-log.sh
Last active December 11, 2021 08:46
apt install history
# Based on https://askubuntu.com/a/360536/868131
# Installation history from archived files
gunzip -c /var/log/apt/history.log.*.gz | egrep 'apt(-get)? install' | cut -f4- -d" " | sort | uniq
# Recent installation history
cat /var/log/apt/history.log | egrep 'apt(-get)? install' | cut -f4- -d" " | sort | uniq
@Caleb9
Caleb9 / .bashrc
Created June 6, 2020 14:10
Git branch with status color in Bash prompt
# Git branch status
# Modified from https://coderwall.com/p/pn8f0g/show-your-git-status-and-branch\-in-color-at-the-command-prompt
function git_color {
local color_red="\e[31m"
local color_green="\e[1;32m"
local color_yellow="\e[1;33m"
local color_ochre="\e[38;5;95m"
local git_status="$(git status 2> /dev/null)"
if [[ ! $git_status =~ "working tree clean" ]]; then
echo -e $color_red
@Caleb9
Caleb9 / avd_selector.sh
Created April 28, 2019 09:52
Simple bash script to select and run specific AVD device.
#!/bin/bash
# Run `emulator` to obtain devices (assumes emulator is on the PATH)
list_avds=$(emulator -list-avds)
# Split list_avds by newline and save to avds array
readarray -t avds <<<$list_avds
# Check if zero or one device only
devices_count=${#avds[@]}
@Caleb9
Caleb9 / userChrome.css
Last active October 9, 2023 21:37
userChrome.css for Firefox with Tree Style Tab. On Windows, put into `%APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\chrome` directory (create if doesn't exist). Also set toolkit.legacyUserProfileCustomizations.stylesheets to true in about:config.
/*
* Edit this file and copy it as userChrome.css into your
* profile-directory/chrome/
*/
/*
* Some possible accessibility enhancements:
*
* Make all the default font sizes 20 pt:
*