Skip to content

Instantly share code, notes, and snippets.

@raininja
raininja / PKGBUILD
Created August 15, 2024 12:32 — forked from valeth/PKGBUILD
[archlinux] PKGBUILD template
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Your Name <youremail@domain.com>
pkgname=NAME
pkgver=VERSION
pkgrel=1
epoch=
@raininja
raininja / install-arch-linux-on-btrfs-subvolume-inside-luks
Created April 9, 2023 20:13 — forked from ansulev/install-arch-linux-on-btrfs-subvolume-inside-luks
Install Arch Linux with full encrypted btrfs subvolume inside luks
# Install Arch Linux with full encrypted btrfs subvolume inside luks
# Hardware: BIOS system, Intel GPU, Nvidia Optimus, Toshiba SSD, Wifi
# Please adjust for your needs.
# filename: install-arch-linux-on-btrfs-subvolume-inside-luks.txt
# The official guide: https://wiki.archlinux.org/index.php/Installation_Guide
# Download the archiso image from https://www.archlinux.org/download/
# Copy to a usb-drive
dd bs=4M if=archlinux.iso of=/dev/sdx status=progress oflag=sync # on linux
@raininja
raininja / .zshrc
Created March 7, 2023 00:47
my zsh config
#
# psibyrions zshrc Sun Sep 14 12:54:24 CDT 2008
#
#
ZSH=/usr/share/oh-my-zsh
# source $ZSH/oh-my-zsh.sh
[[ $TTY == "/dev/tty2" ]] && exec startx
@raininja
raininja / fix-wsl2-dns-resolution
Created September 3, 2022 20:12 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@raininja
raininja / .multitailrc
Created December 22, 2021 18:40 — forked from homeyjd/.multitailrc
multitail color scheme
#~/.bash_profile
alias mt='multitail -CS php'
#~/.multitailrc
# See documentation
# keetweej.vanheusden.com/svn/multitail/trunk/multitail.conf
#
# Get this file right! If you don't multitail will just crash.
# No warning, no error, just won't start. And it's your fault.
@raininja
raininja / makeauthority.sh
Created January 12, 2018 14:42 — forked from richieforeman/makeauthority.sh
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@raininja
raininja / autossh.service
Last active January 13, 2018 17:05 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
[root@b9a5f77b-fbaa-45b7-a775-938bc76ada64 /]# cat /opt/local/etc/varnish/*
vcl 4.0;
import std;
backend default {
.host = "127.0.0.1";
.port = "8080";
}
@raininja
raininja / setup_mosh_centos.sh
Created January 31, 2017 05:27 — forked from tancnle/setup_mosh_centos.sh
Setup mosh on Centos 6.x
#!/bin/sh
# Update latest epel
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6-8.noarch.rpm
# Download and build mosh
sudo yum -y install rpm-build rpmdevtools protobuf-compiler protobuf-devel libutempter-devel zlib-devel ncurses-devel openssh-clients perl-IO-Tty openssl-devel gcc gcc-c++
rpmdev-setuptree
cd ~/rpmbuild/SOURCES
@raininja
raininja / conkyrc
Last active August 10, 2024 02:07
conky lua rings
conky.config = {
-- — Conky settings — #
background = true,
update_interval = 1,
cpu_avg_samples = 2,
net_avg_samples = 3,
override_utf8_locale = true,