Skip to content

Instantly share code, notes, and snippets.

View Nill-R's full-sized avatar

Nill Ringil Nill-R

View GitHub Profile
@Nill-R
Nill-R / torrc
Created November 30, 2019 18:50
Minimal /etc/tor/torrc
SOCKSPort 9050
ExcludeNodes {ru}
ExcludeExitNodes {ru},{kz},{by},{cn},{kg},{tj},{uz},{ir}
Log notice file /var/log/tor/notices.log
@Nill-R
Nill-R / 20-yggdrasil.conf
Created December 30, 2019 06:04
Yggdrasil rsyslog conf
if $programname == 'yggdrasil' then /var/log/yggdrasil.log
& stop
@Nill-R
Nill-R / yggdrasil
Last active February 5, 2020 06:10
Logrotate for yggdrasil
/var/log/yggdrasil.log {
daily
missingok
rotate 2
compress
olddir /var/log/old
dateext
dateformat -%Y-%m-%d.log
notifempty
create 640 syslog adm
@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 / monitoring_https.bash
Last active February 26, 2020 07:10
Simple monitoring scripts using nagios plugin
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "No domain for check"
exit 1
fi
/usr/lib/nagios/plugins/check_http -j HEAD --ssl -H $1 > /tmp/$1.check 2>&1
if [ $? -eq 0 ]
## NOTE! this works for me but has recieved very limited testing!
## Enable auto updates for GITEA:
# shell script to check github repo for "latest" tag and compare to current running gitea version
# assumes systemd is in use to manage gitea service
# assumes gitea binary file lives at: /usr/local/bin/gitea
# assumes Ubuntu 18.04 is in use (but should work on any debian / apt system)
# assumes your local gitea api instance is reachable at: "http://192.168.4.22:3000/api/v1/version"
# assumes your ok with downloading the latest binary from github without any validation
#
[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 / 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,
@Nill-R
Nill-R / nftables.conf
Last active January 3, 2022 16:36
First look to nftables
#!/usr/sbin/nft -f
flush ruleset
define CF_IPS = {
173.245.48.0/20,
103.21.244.0/22,
103.22.200.0/22,
103.31.4.0/22,
141.101.64.0/18,
@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