Skip to content

Instantly share code, notes, and snippets.

View yordanoweb's full-sized avatar
💭
I may be slow to respond.

Yordano Pascual Rivera yordanoweb

💭
I may be slow to respond.
  • Freelancer
  • Las Tunas, Cuba
View GitHub Profile
@yordanoweb
yordanoweb / gpg-usage.md
Last active January 13, 2025 19:52
GPG frequently usages

Generate random string with GPG

gpg --armor --gen-random 2 16
  • The 16 is the amount of bytes
@yordanoweb
yordanoweb / dnscrypt.md
Last active January 13, 2025 19:53
DNS-Crypt in ArchLinux

Use DNSCrypt-Proxy to secure name resolution

Install related packages

pacman -S dnscrypt-proxy

Force system to use dnscrypt-proxy

@yordanoweb
yordanoweb / rotate-90-clockwise-ffmpeg.md
Last active January 13, 2025 19:53
Rotate video 90 degrees clockwise with ffmpeg

Rotate video 90 degrees

ffmpeg -i input_video.mp4 -vf "rotate=0.001" output_video.mp4
@yordanoweb
yordanoweb / zsh-unfreeze-tab-autocomplete.md
Last active January 13, 2025 19:55
Save the day with zsh hang when tab autocomplete freezes

Unfreeze tab autocomplete on ZSH

ohmyzsh/ohmyzsh#7023 (comment)

Basically, edit ~/.zshrc and uncomment the line:

# Uncomment the following line to use case-sensitive completion.
CASE_SENSITIVE="true"
@yordanoweb
yordanoweb / shell-ps1-prompts.md
Last active January 13, 2025 19:55
My shell prompts

Play a little with shell prompt

Some colors

user@host ::: dir $

PS1="\[\033[38;5;141m\]\u\[\033[38;5;209m\]@\[\033[38;5;105m\]\h \[\033[38;5;209m\]::: \[\033[01;37m\]\W \[\033[38;5;209m\]$ \[\033[1;00m\]"
@yordanoweb
yordanoweb / rust-static-build.md
Last active January 13, 2025 19:56
Rust static build

Rust static build

In the root of the Rust project, compile with this leading option:

RUSTFLAGS="-C target-feature=+crt-static" cargo build --target x86_64-unknown-linux-gnu

For a release compilation

@yordanoweb
yordanoweb / must-install.md
Last active January 13, 2025 19:57
Must install after every distro change or upgrade

Linux Advanced Power Management

Install the distro package: tlp

  • It helps to extend the laptop battery performance.
  • Makes applications run faster by prefetching binaries and shared objects

Install the distro package: preload

  • It helps to run application a little faster.
@yordanoweb
yordanoweb / vim-ide.md
Last active January 13, 2025 19:57
Prepare vim as a full IDE

Turn Vim editor into an IDE

Prerequisites

  • Install NodeJS and Npm

Download plug.vim

curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@yordanoweb
yordanoweb / rofi-simple-config.md
Last active January 13, 2025 19:58
My simple rofi config

My rofi config

In ~/.config/i3/config modify the line that calls dmenu:

bindsym $mod+d exec "rofi -show drun -config /path/where/you/put/theme.rasi"
/**
@yordanoweb
yordanoweb / i3status.md
Last active February 23, 2025 16:24
A brief i3 status bar config with JSON

Set up i3status

Prepare i3 for the status script output

In the $HOME/.config/i3/config set the bar section to this:

bar {
        # comment this line as it is the default value
        # status_command i3status