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
use std::fs::{self, DirEntry}; | |
use std::path::Path; | |
use std::process::Command; | |
fn optimize_img(path: &DirEntry, root_path: &Path) { | |
let path_binding = path.path(); | |
let root_str = root_path.to_str().expect("Path should exist."); | |
let name_binding = path.file_name(); | |
let path_name = path_binding.to_str().expect("Filename should exist."); | |
let current_data = name_binding.to_str().expect("Current path should exist."); |
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
const NodeRSA = require('node-rsa'); | |
// generate new public/private key-pair | |
const key = new NodeRSA({ b: 2048 }); | |
const publicKey = key.exportKey('pkcs8-public-pem'); | |
const privateKey = key.exportKey('pkcs8-private-pem'); | |
// print the keys | |
console.log('\nPUBLIC KEY:\n'); | |
console.log(publicKey); |
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
version: '3' | |
services: | |
netdata: | |
image: netdata/netdata | |
container_name: netdata | |
hostname: example.com # set to fqdn of host | |
ports: | |
- 91:19999 | |
restart: unless-stopped | |
cap_add: |
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
version: "3" | |
services: | |
app: | |
image: jc21/nginx-proxy-manager:2 | |
restart: always | |
ports: | |
# Public HTTP Port: | |
- '80:80' | |
# Public HTTPS Port: | |
- '443:443' |
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
version: '3' | |
volumes: | |
nextcloud: | |
db: | |
services: | |
db: | |
image: mariadb | |
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW |
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
version: "3" | |
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/ | |
services: | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
ports: | |
- "53:53/tcp" | |
- "53:53/udp" |
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
{ | |
"database": { | |
"engine": "mysql", | |
"host": "db", | |
"name": "npm", | |
"user": "npm", | |
"password": "npm", | |
"port": 3306 | |
} | |
} |
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
# Verbosity and settings that you pretty much just always are going to want. | |
alias \ | |
cp="cp -iv" \ | |
mv="mv -iv" \ | |
rm="rm -v" \ | |
mkd="mkdir -pv" \ | |
r="ranger" \ | |
c="clear" \ | |
yt="youtube-dl --add-metadata -i" \ | |
yta="yt -x -f bestaudio/best" \ |