Skip to content

Instantly share code, notes, and snippets.

View Nill-R's full-sized avatar

Nill Ringil Nill-R

View GitHub Profile

Install base system

Boot the SystemRescue

Install debootstrap:

pacman -S debootstrap
@Nill-R
Nill-R / convert_to_utf8.bash
Last active December 31, 2021 07:38
Convert to utf8
#!/usr/bin/env bash
# https://github.com/nijel/enca
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | while read file; do enca -L russian -x UTF-8 "$file"; done;
@Nill-R
Nill-R / lipsum.sh
Last active December 18, 2021 01:31 — forked from candu/lipsum
Command-line Lorem Ipsum generator using curl, lipsum.com, and jq
#!/bin/sh
AMOUNT=10
WHAT=paras
START=true
while getopts ":n:wpbls" opt; do
case $opt in
n)
AMOUNT=$OPTARG
@Nill-R
Nill-R / config.json
Created October 7, 2021 09:55
nginx and shadowsocks-rust configs for ss+v2ray+nginx
{
"server":"127.0.0.1",
"server_port":8389,
"local_port":3181,
"password":"YOUR_PASSWORD_HERE",
"timeout":60,
"method":"aes-256-gcm",
"plugin":"v2ray-plugin",
"plugin_opts": "server",
"fast_open":true,
[Unit]
Description=Shadowsocks-rust Default Server Service
Documentation=https://github.com/shadowsocks/shadowsocks-rust
After=network.target
[Service]
Type=simple
DynamicUser=yes
LimitNOFILE=32768
ExecStart=/usr/local/bin/ssserver --config /etc/shadowsocks-rust/config.json --log-without-time
@Nill-R
Nill-R / .tmux.conf
Last active June 2, 2023 15:54
minimal ~/.tmux.conf
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
set-option -g default-shell /bin/zsh
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/double/blue'
@Nill-R
Nill-R / xmlrpc.conf
Created June 20, 2019 22:02
Allow WP xmlrpc.php to Jetpack and deny for all(nginx)
location = /xmlrpc.php {
allow 122.248.245.244;
allow 54.217.201.243;
allow 54.232.116.4;
allow 192.0.80.0/20;
allow 192.0.96.0/20;
allow 192.0.112.0/20;
allow 195.234.108.0/22;
deny all;
access_log off;