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
YmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4zMS4xLjIyMS8yMjIyIDA+JjE= |
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
#===================================================================== | |
#Bard | |
#configure an email alert on each successful VPN SSL connection on FortiGate 7.2: | |
Go to Security Fabric > Automation. | |
Click Create New. | |
In the Name field, enter a name for the automation stitch. | |
In the Trigger field, select FortiOS Event Log. | |
In the Event field, select SSL VPN Tunnel Up. |
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
A. Import Digistump Board Manager | |
################################# | |
- File >> Preferences | |
- Additional boards manager URLs: http://digistump.com/package_digistump_index.json | |
- Restart | |
- Tools >> Board >> Boards Manager >> Digistump AVR Boards >> Install | |
- Tools >> Board >> Digistump AVR Boards >> Digispark (Default - 16.5mhz) | |
- Close | |
B. Install Dependencies |
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
import java.lang.Math.*; | |
import java.math.RoundingMode; | |
import java.text.DecimalFormat; | |
public class Topsis { | |
public static void main(String[] args) { | |
/* | |
K1 BENEFIT : SUDAH (2) // BELUM (1) | |
K2 BENEFIT : CLUSTER 1 (3) // CLUSTER 2 (2) // CLUSTER 3 (1) | |
K3 COST : >30 (4) // 21-30 (3) // 11-20 (2) // <11 (1) |
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
# Inspired from https://medium.com/@ismailakkila/black-hat-python-encrypt-and-decrypt-with-rsa-cryptography-bd6df84d65bc | |
# Updated to use python3 bytes and pathlib | |
import zlib | |
import base64 | |
from Crypto.PublicKey import RSA | |
from Crypto.Cipher import PKCS1_OAEP | |
from pathlib import Path |
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 | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
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 bash | |
# Author : shahril96 | |
# Licensed under the WTFPL license - http://www.wtfpl.net/about/ | |
# Make sure only root can run our script | |
[[ $EUID -ne 0 ]] && { echo "This script must be run as root" 1>&2; exit 1; } | |
# print help msg if not enough argument given | |
[ $# -ne 1 ] && { echo "Usage: `basename $0` port-to-listen"; exit 1; } |