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
| //-------------------------------------------------- | |
| // purpose : generate a password with 11 characters | |
| // return a string | |
| //-------------------------------------------------- | |
| function fncGeneratePwd() { | |
| const sCharSymbols = "+=?!@#$%*"; // you can add more symbols | |
| const sCharDigits = "0123456789"; | |
| const sCharUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
| const sCharLower = "abcdefghijklmnopqrstuvwxyz"; |
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
| //---------------------------------------------------------- | |
| // purpose : retreive a date with a specific format | |
| // example = 31-01-2024 01:27:55 | |
| //---------------------------------------------------------- | |
| function fncFormatDate() { | |
| let currentDatetime = new Date(); | |
| let formattedDate = fncaddLeadingZeros(currentDatetime.getDate()) + "-" + | |
| fncaddLeadingZeros(currentDatetime.getMonth() + 1) + "-" + | |
| currentDatetime.getFullYear() + " " + | |
| fncaddLeadingZeros(currentDatetime.getHours()) + ":" + |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script> | |
| function isnumber (elem) { | |
| k = elem.value; | |
| // check for only digits | |
| // check for only 1 dot | |
| // check for only 2 digits after dot |
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
| #------------------------------------------------------ | |
| # This Creates New Local User with credentials ⇢ Adds it to a Group ⇢ Creates and Shares its Folder | |
| #------------------------------------------------------ | |
| #------------------------------------------------------ | |
| # Get Random String | |
| #------------------------------------------------------ | |
| Function Get-RandomAlphanumericString { | |
| [CmdletBinding()] |
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
| #----------------------------------------------------------- | |
| # purpose : sends an email | |
| # variables : $body | |
| # $Subject | |
| # $From | |
| # $SMTP | |
| # $myPassword | |
| # just adapt to your credentials | |
| #----------------------------------------------------------- |
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
| #-------------------------------------------------------------------- | |
| # purpose : 1. generate random password | |
| # 2. generate salt | |
| # 3. Encrypt password with salt | |
| #-------------------------------------------------------------------- | |
| #-------------------------------------------------------------------- | |
| # purpose : generate a ComputeHash | |
| # params : anystring |
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
| #-------------------------------------------------------------------- | |
| # purpose : Delete all Files in specific folders older than 14 days | |
| # params : $sDirToCheck | |
| #-------------------------------------------------------------------- | |
| Function fncDeleteOldBackups([String] $sDirToCheck) | |
| { | |
| $Daysback = "-14" | |
| $CurrentDate = Get-Date | |
| $DatetoDelete = $CurrentDate.AddDays($Daysback) |
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
| #------------------------------------------------------------------------------ | |
| # Purpose : By using this script, you avoid having to use the forms from GPEDIT.MSC manually | |
| # Usage : This forces windows users to autoconnect to Onedrive and be linked. | |
| # | |
| # Required : OneDrive must be installed before using this. | |
| # : An ENTRA-INTUNE administrator Account Office 365 (professional / school) must first be SET on Windows, before using this. | |
| # | |
| # Run as administrator | |
| # info : Users are still able to disable synchronization of some folders. | |
| # source : https://admx.help/?Category=Windows_10_2016&Language=en-us |
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 | |
| //------------------------------------------------------------------------ | |
| // purpose : this is used to check if a Belgian person's national registry number is correct | |
| // params : $sNumber (11 digits) example 84102512345 | |
| // $sTmpYear (4 digits) exemple : 1984 | |
| // output : true/false | |
| //------------------------------------------------------------------------ | |
| function fncCheckBelgianRegistryNumber($sNumber, $sTmpYear) { |
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 | |
| #--------------------------------------------------------------- | |
| # -> filename : rustdesk.sh | |
| # -> sudo chmod u+x rustdesk.sh | |
| # -> Usage : ./rustdesk.sh | |
| # | |
| # This tool implies, that you have set multiple RustDesk Servers. | |
| # | |
| # change : xxx.xxx.xxx.xxx by your first network |