Skip to content

Instantly share code, notes, and snippets.

View DeckerSU's full-sized avatar

DeckerSU DeckerSU

View GitHub Profile
@DeckerSU
DeckerSU / ubuntu_enable_bbr.sh
Created March 29, 2018 19:33 — forked from Jamesits/ubuntu_enable_bbr.sh
Ubuntu enable BBR
#!/bin/bash
set -eu
SYSCTL_FILE=/etc/sysctl.d/90-tcp-bbr.conf
# check root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
@DeckerSU
DeckerSU / test1
Created October 22, 2018 00:31
test1
test1
@DeckerSU
DeckerSU / test1
Created October 22, 2018 00:36
test1
test1
@DeckerSU
DeckerSU / test1
Created October 22, 2018 00:36
test1
test1
@DeckerSU
DeckerSU / test1
Created October 22, 2018 00:39
test1
some important text
@DeckerSU
DeckerSU / gist:873ff22a9be7d5c3bca0fb874d7fc9c4
Created May 6, 2019 15:06 — forked from luckydev/gist:b2a6ebe793aeacf50ff15331fb3b519d
Increate max no of open files limit in Ubuntu 16.04/18.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf
@DeckerSU
DeckerSU / keepassxc_build_ubuntu_16.04_static.sh
Created September 27, 2019 22:04
Build script for KeePassXC for Ubuntu 16.04 (x64)
#!/bin/bash
# Build script for KeePassXC for Ubuntu 16.04 (x64) by Decker (q) 2019
# Follow the original instructions, i.e. mkdir build, cd build, place script in created
# build folder and run. You should get your keepassxc binaries in build/release folder.
CURDIR=$(pwd)
PREFIX=${CURDIR}/depends
BUILD=${CURDIR}/release
@DeckerSU
DeckerSU / keybase.md
Created February 13, 2020 18:15
keybase.md

Keybase proof

I hereby claim:

  • I am DeckerSU on github.
  • I am deckersu (https://keybase.io/deckersu) on keybase.
  • I have a public key whose fingerprint is FD9A 772C 7300 F4C8 94D1 A819 FE50 4808 62E6 451C

To claim this, I am signing this object:

@DeckerSU
DeckerSU / gitian-BTC-v0.16.3.md
Created October 8, 2020 23:15 — forked from cryptozeny/gitian-BTC-v0.16.3.md
gitian cross compilation for BTC v0.16.3
@DeckerSU
DeckerSU / rsync_daemon_over_ssh.md
Created May 6, 2021 03:28 — forked from trendels/rsync_daemon_over_ssh.md
Rsync daemon mode over ssh

rsync daemon mode over ssh

There are several common ways to do rsync backups of hosts over ssh:

  1. As a non-root user. Upsides: very secure. Downside: cannot back up sensitive files.
  2. As root, with a public key. Downsides: Whoever has the private key has full root access to the host being backed up.
  3. As root, with a public key and a "forced command". Upsides: Restricts access to the server. Downsides: Requires either careful matching of rsync options (which might change over time), or "validator" scripts. Neither idea sounds very appealing to me.
  4. Running rsync in daemon mode on the host being backed up. Upsides: Lots of useful options, like read-only mode, running as a different user if required, server-side excludes/includes, etc. Downsides: Opens up a TCP port that has full filesystem read access and is hard to secure (Ideally you could make the rsync daemon use a unix socket instead, that could be secured by filesystem permissions, but I haven't found a way to do that).

Here is another option t