$ brew install unbound ldns
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
import bcrypt from '@node-rs/bcrypt'; | |
export async function hashPassword(str: string): Promise<string> { | |
return await bcrypt.hash(str, 10); | |
} | |
export async function validatePassword(str: string, hash: string): Promise<boolean> { | |
return bcrypt.verify(str, hash); | |
} |
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
#!/bin/bash | |
## Forked from https://github.com/K0p1-Git/cloudflare-ddns-updater | |
# Sample crontab per 6 hours: 0 */6 * * * /usr/bin/cloudflare-ddns-updater.sh | |
AUTH_METHOD="token" # Set to "global" for Global API Key or "token" for Scoped API Token | |
AUTH_EMAIL="CF_AUTH_EMAIL" # The email used to login 'https://dash.cloudflare.com' | |
AUTH_KEY="CF_AUTH_KEY" # Your API Token or Global API Key | |
ZONE_IDENTIFIER="CF_ZONE_ID" # Can be found in the "Overview" tab of your domain | |
RECORD_NAME="CF_RECORD_NAME" # Example: "sub.domain.com" |
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
# Tahapan : | |
1. Update komponen sistem operasi : | |
> apt update | |
> apt full-upgrade | |
> apt install net-tools | |
2. Instalasi Python 3 | |
> apt install python3-all python-is-python3 | |
> apt install python3-pip pipenv |
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 connection parameter | |
spring.datasource: | |
url: jdbc:postgresql://localhost:5432/dbname?useSSL=false&useLegacyDatetimeCode=false | |
username: postgres | |
password: dbpasswd | |
# Hibernate ddl auto (create, create-drop, validate, update) | |
spring.jpa: | |
database-platform: org.hibernate.dialect.PostgreSQLDialect | |
hibernate.ddl-auto: update |
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
<VirtualHost *:80> | |
ServerName ${vhost} | |
ServerAlias www.${vhost} | |
DocumentRoot /var/www/${vhost}/public/html | |
Redirect / https://${vhost} | |
</VirtualHost> | |
<VirtualHost *:443> | |
Header set Strict-Transport-Security "max-age=63072000; includeSubdomains;" | |
Header set Content-Security-Policy "default-src https://${vhost}:443" | |
Header set x-frame-options "SAMEORIGIN" |
Using Laravel Valet for localhost development, So it installs
dnsmasq
with it. dnsmasq runs on port53
, The default DNS port. So we setup dnscrypt-proxy on port5300
with the default config files in this gist.
brew install dnscrypt-proxy
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
import javax.crypto.*; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.security.*; |
I hereby claim:
- I am riipandi on github.
- I am riipandi (https://keybase.io/riipandi) on keybase.
- I have a public key whose fingerprint is 2A51 AA3F 81B4 8A92 6916 4754 2874 4492 87E9 BDF3
To claim this, I am signing this 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
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then echo 'This script must be run as root' ; exit 1 ; fi | |
[ -z $ROOTDIR ] && PWD=$(dirname $(dirname $(readlink -f $0))) || PWD=$ROOTDIR | |
source "$PWD/setup.sh" | |
# -------------------------------------------------------------------------------------------------- | |
# Install and configure WireGuard server | |
# -------------------------------------------------------------------------------------------------- | |
LC_ALL=C.UTF-8 add-apt-repository -y ppa:wireguard/wireguard && apt -y full-upgrade | |
apt -y install linux-headers-$(uname -r) wireguard iptables resolvconf qrencode gpw |
NewerOlder