Skip to content

Instantly share code, notes, and snippets.

@brunomiguel
brunomiguel / readable-hacker-news.css
Created January 9, 2025 15:33
Readable Hacker News
* {
-webkit-font-smoothing: subpixel-antialiased !important;
text-rendering: optimizelegibility !important;
-moz-osx-font-smoothing: grayscale !important;
font-smooth: always !important;
font-family: rubik !important;
}
body,
td,
@brunomiguel
brunomiguel / .sh
Created August 27, 2024 11:22
Shell function for system upgrade and cleanup on Arch
function sysupdate {
local native() {
tput bold;
echo "\n\e[0;93mUpdating native packages..."
tput sgr0;
paru -Syyuv;
}
local fltpk() {
@brunomiguel
brunomiguel / XScreenManage.sh
Last active March 18, 2024 01:55
Manage screensaver and screen blanking statuses on X11
function XScreenManage {
if ! command -v notify-send &> /dev/null; then
echo -e "Warning: notify-send could not be found. Please install it using\
your distribution native package manager. On Arch Linux, you can install it\
with \"sudo pacman -Sy libnotify\""
return 1 2>/dev/null
fi
local blanking() {
@brunomiguel
brunomiguel / toot-for-zsh.sh
Last active November 28, 2022 01:40
Toot with images from ZSH using the toot command line client for Mastodon (I'm using it as a function on my .zshrc)
# Toot with images from the command line
# License: GPLv3 (https://www.gnu.org/licenses/gpl-3.0.txt)
function tooti {
# Allow using trap inside a function
set -o localoptions -o localtraps
# Check if toot is in $PATH
if ! type toot > /dev/null; then
echo -e "\n\e[0;93mWarning: toot not found in \$PATH\n"
echo -e "Please install it using your package manager or from https://github.com/ihabunek/toot\n"
@brunomiguel
brunomiguel / mastodon-tweaks.css
Last active November 15, 2022 18:16
Tweaks para o Mastodon
:root,
html,
body {
font-family: "inter", rubik, sans-serif !important;
}
body.theme-mastodon-light {
background: #f4f8fa !important;
}
@brunomiguel
brunomiguel / gist:6c77708813f457f48ea1e492f4c74d6f
Created January 21, 2022 09:55
picom-ibhagwan-git config
# ░█▀█░▀█▀░█▀▀░█▀█░█▄█░░░░█▀▀░█▀█░█▀█░█▀▀
# ░█▀▀░░█░░█░░░█░█░█░█░░░░█░░░█░█░█░█░█▀▀
# ░▀░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░░▀▀▀░▀▀▀░▀░▀░▀░░
#
# X compositor configuration
# ░█▀▀░█░█░█▀█░█▀▄░█▀█░█░█
# ░▀▀█░█▀█░█▀█░█░█░█░█░█▄█
# ░▀▀▀░▀░▀░▀░▀░▀▀░░▀▀▀░▀░▀
@brunomiguel
brunomiguel / discord-theme-improvements.css
Last active February 16, 2022 16:26
My personal changes to Discord's theme, to be used with Stylus browser extension
* {
-webkit-font-smoothing: subpixel-antialiased !important;
text-rendering: optimizelegibility !important;
-moz-osx-font-smoothing: grayscale !important;
/*font-smooth: grayscale !important;*/
font-smooth: always !important;
}
:root {
--text-link: hsl(212,calc(var(--saturation-factor, 1)*100%),43.9%);
@brunomiguel
brunomiguel / better-tweetdeck-css-changes.css
Created November 12, 2021 17:23
Better Tweetdeck CSS changes
/* I'm using FiraGo (https://github.com/bBoxType/FiraGO) as the default font in the browser */
* {font-family: sans-serif !important;}
/* adds a bit of padding to the card showing a tweet */
article {
padding: 10px 5px !important
}
/* I prefer light borders */
html.dark .stream-item, html.dark .column-header {
@brunomiguel
brunomiguel / dark-aur.css
Last active September 30, 2021 17:41
AUR Dark Theme, to be used with the browser addon Stylus. This is an alpha version
* {
font-family: sans-serif !important;
}
body {
background: #222 !important;
color: #eee;
}
a:visited {
#! /usr/bin/env bash
UPTIME_DAYS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 / 86400)
UPTIME_HOURS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 / 3600)
UPTIME_MINUTES=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 % 3600 / 60)
# Basic info
HOSTNAME=`uname -n`
ROOT=`df -Ph | grep -w nbd0p1 | awk '{print $4}' | tr -d '\n'`