- Using a ready-to-use Ubuntu image
This file contains hidden or 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 | |
| systemctl disable systemd-resolved | |
| systemctl stop systemd-resolved | |
| rm -rf /etc/resolv.conf | |
| echo "nameserver 8.8.8.8" > /etc/resolv.conf | |
| echo "nameserver 8.8.4.4" > /etc/resolv.conf | |
| dig premiumfast.net | |
| dig s3.ap-southeast-1.amazonaws.com |
This file contains hidden or 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 | |
| log_file="/var/log/pveproxy/access.log" | |
| iptables_chain="INPUT" | |
| iptables_action="-A" | |
| iptables_command="/sbin/iptables" | |
| iptables_log_prefix="[BLOCKED IP]" | |
| # Regular expression pattern to match IP addresses and status codes in the log file | |
| log_entry_pattern="([0-9]{1,3}\.){3}[0-9]{1,3}.* 200" |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| import os | |
| import sys | |
| import argparse | |
| import re | |
| import csv | |
| from datetime import datetime, timezone | |
| import pytz |
This file contains hidden or 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 | |
| function generate_password($int = 12) { | |
| $length = 32; | |
| if (PHP_VERSION>=7) { | |
| $bytes= random_bytes($length); | |
| } else { | |
| $bytes= openssl_random_pseudo_bytes($length); | |
| } |
This file contains hidden or 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 | |
| ISRG_CHECK=$( openssl x509 -noout -text -in /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt | grep Issuer | grep "CN = ISRG Root X1" ) | |
| if [[ ! $ISRG_CHECK ]]; then | |
| mkdir -p /usr/share/ca-certificates/letsencrypt | |
| curl -o /usr/share/ca-certificates/letsencrypt/ISRG_Root_X1.crt https://letsencrypt.org/certs/isrgrootx1.pem | |
| sed -i 's/mozilla\/DST_Root_CA_X3.crt/!mozilla\/DST_Root_CA_X3.crt/g' /etc/ca-certificates.conf | |
| echo "letsencrypt/ISRG_Root_X1.crt" | tee -a /etc/ca-certificates.conf | |
| update-ca-certificates | |
| fi |
This file contains hidden or 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
| Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" |
This file contains hidden or 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
| For this to work, you have to include CDNs for JQuery and FabricJS. | |
| ***The View**** | |
| ===The blade file=== | |
| The CSS | |
| <style> | |
| #sheet-container { | |
| width: 250px; | |
| height: 100px; | |
| border: 1px solid black; |
This file contains hidden or 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
| # Read more about setting it up | |
| # https://medium.com/@ljmocic/deploying-react-application-to-aws-s3-using-github-actions-85addacaeace | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build: |