Skip to content

Instantly share code, notes, and snippets.

View kerunaru's full-sized avatar
💡
Solving

Juan Manuel Cabello kerunaru

💡
Solving
View GitHub Profile
@Muriano
Muriano / remove-non-semver-tags.sh
Created August 22, 2023 08:29
Remove tags that are not semver tags. Has preview and confirmation.
#!/bin/bash
TAGS=$(git tag)
SEMVER_REGEX='^[0-9]+\.[0-9]+\.[0-9]+$'
NON_SEMVER_TAGS=()
@Muriano
Muriano / migrate-repo.sh
Last active August 22, 2023 10:52
Easy migration between bb and gh repos
#!/bin/bash
# Check if GitHub CLI is installed
if ! command -v gh &> /dev/null; then
echo "🚨 Error: GitHub CLI (gh) is not installed. Please install it: https://cli.github.com/"
exit 1
fi
# Check if a repository URL is provided
if [ "$#" -ne 1 ]; then
@xkr47
xkr47 / libera.irssi
Last active September 28, 2023 09:39
How to add the libera.chat network to irssi
Replace all <....> parts with your specific details
/network add -nick <nick> libera
/server add -network libera -auto -ssl irc.libera.chat 6697
/connect libera
/query NickServ
register <password> <email>
<copypaste line from email>
/network add -autosendcmd "" -sasl_username <user> -sasl_password <pass> -sasl_mechanism PLAIN libera
/channel add -auto <channel> libera
@andrebrait
andrebrait / keychron_linux.md
Last active June 26, 2024 03:35
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@sdushantha
sdushantha / instructions.md
Last active November 17, 2023 10:12
ncmpcpp + mpd + mpc on macOS

Install the required packages

brew install ncmpcpp mpd mpc

Make the.mpd directory in your home directory

mkdir ~/.mpd
@sainnhe
sainnhe / lightline-and-tmux-config.md
Last active October 26, 2022 23:52
Sexy & Powerful Configuration for Lightline and Tmux

𝑺𝒆𝒙𝒚 & 𝑷𝒐𝒘𝒆𝒓𝒇𝒖𝒍 𝑪𝒐𝒏𝒇𝒊𝒈𝒖𝒓𝒂𝒕𝒊𝒐𝒏 𝒇𝒐𝒓 𝑳𝒊𝒈𝒉𝒕𝒍𝒊𝒏𝒆 𝒂𝒏𝒅 𝑻𝒎𝒖𝒙

Nerd Font

First of all, install a nerd font, and apply it: nerd font

@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 3, 2024 17:43
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active June 28, 2024 17:15
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@romainl
romainl / colorscheme-override.md
Last active May 27, 2024 00:17
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.
# Paste this function in your ".bashrc" to enable the "pomo" command in your terminal
# POMODORO Terminal:
function pomo {
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo -e "POMODORO Terminal\n"
echo "usage: pomo 25 minutes timeout"
echo -e " or: pomo [options] see options below\n"
echo "Options:"
echo " short: 05 minutes timeout"
echo " long: 15 minutes timeout"