Skip to content

Instantly share code, notes, and snippets.

@panicwithme
panicwithme / encrypt_hdd.sh
Last active May 23, 2021 13:39
Encrypt external HDD with cryptsetup
# https://gitlab.com/cryptsetup/cryptsetup/-/wikis/FrequentlyAskedQuestions#2-setup
# !!!!!!!!!!!!!!!!!!!!!!!!!
# !!! BACKUP YOUR FILES !!!
# !!!!!!!!!!!!!!!!!!!!!!!!!
sudo pacman -S cryptsetup
# Find out the path of the partition
sudo fdisk -l
@panicwithme
panicwithme / gp_issue.md
Last active May 8, 2021 18:16
GITHUB :: Solve github-pages issue

The issue was getting

Could not find gem 'github-pages' in rubygems repository https://rubygems.org/ or installed locally.

output when I was trying to execute bundle exec jekyll serve

This was because github-pages supports jekyll v3.9 but I had jekyll v4.2.

So I downgraded jekyll:

@panicwithme
panicwithme / config.toml
Last active May 8, 2021 19:50
i3 :: My i3status-rust slick theme customization
# https://github.com/greshake/i3status-rust
# Edit ~/.config/i3/config
#bar {
# font pango:DejaVu Sans Mono, FontAwesome 12
# position top
# status_command /usr/bin/i3status-rs $XDG_CONFIG_HOME/i3status-rust/config.toml
# colors {
# focused_workspace #B54545 #B54545 #FFFFFF
# background #303030
@panicwithme
panicwithme / embed_gist.md
Created May 7, 2021 15:35
GITHUB :: Embed a gist to a GitHub Pages post

Add this line to your Gemfile:

gem "github-pages", group: :jekyll_plugins

Then, add this to your post to embed the gist:

{% gist GIST_ID %}

@panicwithme
panicwithme / install_snap.sh
Created May 6, 2021 22:42
INSTALL :: install snap
# Arch Linux
cd /opt
sudo git clone https://aur.archlinux.org/snapd.git
sudo chown -R username:username ./snapd
cd snapd
makepkg -si
sudo systemctl enable --now snapd.socket
@panicwithme
panicwithme / cidem.rasi
Last active May 8, 2021 11:35
i3 :: My rofi theme
# Create cidem.rasi in /usr/share/rofi/themes
# sudo nano /usr/share/rofi/themes/cidem.rasi
configuration {
columns: 2;
lines: 5;
width: 30;
}
* {
@panicwithme
panicwithme / add_rofi.sh
Created May 6, 2021 18:58
i3 :: Replace dmenu with rofi
# Arch Linux
# i3wm
sudo pacman -S rofi
# If you want to customize rofi
# Dump default configs to the file
rofi -dump-xresources > ~/.config/rofi/config
# You can then play with this config file
@panicwithme
panicwithme / natural_scrolling.sh
Created May 6, 2021 15:23
i3 :: Enable natural scrolling
# Add <<Option "Natural Scrolling" "true">> into the <<Section>> block.
sudo sed -i '/^EndSection/i \ \ \ \ Option "Natural Scrolling" "true"' /etc/X11/xorg.conf.d/30-touchpad.conf
@panicwithme
panicwithme / change_wp.sh
Created May 6, 2021 15:08
i3 :: Change wallpaper
# Arch Linux
sudo pacman -S feh
echo "exec feh --bg-fill ~/Pictures/i3_bg.jpg" >> ~/.config/i3/config
# Logout, login