apt update
apt install nfs-kernel-server
mkdir /mnt/nfs -p
chown nobody:nogroup /mnt/nfs
chmod 777 /mnt/nfs
nano /etc/exports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GDB commands by function - simple guide | |
--------------------------------------- | |
More important commands have a (*) by them. | |
Startup | |
% gdb -help print startup help, show switches | |
*% gdb object normal debug | |
*% gdb object core core debug (must specify core file) | |
%% gdb object pid attach to running process | |
% gdb use file command to load object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deb http://deb.debian.org/debian bullseye main contrib non-free | |
deb http://deb.debian.org/debian bullseye-updates main contrib non-free | |
deb http://deb.debian.org/debian bullseye-backports main contrib non-free | |
deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## key only auth | |
ChallengeResponseAuthentication no | |
PasswordAuthentication no | |
PermitRootLogin prohibit-password | |
PubkeyAuthentication yes |
rsync -e "ssh -p8888 -o Compression=no" 127.0.0.1:/mnt/1TB/backup.tar.gz -P ./backup.tar.gz
rsync -P ./backup.tar.gz -e "ssh -p8888 -o Compression=no" 127.0.0.1:/mnt/1TB/backup.tar.gz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# always start with interface up | |
auth eth0 | |
# Static | |
iface eth0 inet static | |
address 192.168.1.5 | |
netmask 255.255.255.0 | |
gateway 192.168.1.254 | |
dns-nameservers 192.168.1.250 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] extern crate rocket; | |
use std::env; | |
use anyhow::Result; | |
use rocket::State; | |
use rocket::http::Status; | |
use sqlx::{Pool, Postgres}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) === | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated December 2021 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40 | |
class DumpHTTPRequestToFile { | |
public function execute($targetFile) { | |
$data = sprintf( | |
"%s %s %s\n\nHTTP headers:\n", | |
$_SERVER['REQUEST_METHOD'], | |
$_SERVER['REQUEST_URI'], | |
$_SERVER['SERVER_PROTOCOL'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
httpClient.DefaultRequestHeaders.Authorization = | |
new AuthenticationHeaderValue( | |
"Basic", | |
Convert.ToBase64String( | |
System.Text.ASCIIEncoding.ASCII.GetBytes( | |
string.Format("{0}:{1}", username, password)))); |