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
| VersionCompare(version1, version2) | |
| { | |
| StringSplit, verA, version1, . | |
| StringSplit, verB, version2, . | |
| Loop, % (verA0> verB0 ? verA0 : verB0) | |
| { | |
| if (verA0 < A_Index) | |
| verA%A_Index% := "0" | |
| if (verB0 < A_Index) | |
| verB%A_Index% := "0" |
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 encryptAES($content, $secret){ | |
| return openssl_encrypt($content, "AES-256-CBC", $secret); | |
| } | |
| function decryptAES($content, $secret){ | |
| return openssl_decrypt($content, "AES-256-CBC", $secret); | |
| } |
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
| <script> | |
| function log(msg, color) { | |
| color = color || "black"; | |
| bgc = "White"; | |
| switch (color) { | |
| case "success": color = "Green"; bgc1 = "LimeGreen"; break; | |
| case "info": color = "DodgerBlue"; bgc1 = "Turquoise"; break; | |
| case "error": color = "Red"; bgc1 = "Black"; break; | |
| case "start": color = "OliveDrab"; bgc1 = "PaleGreen"; break; | |
| case "warning": color = "Tomato"; bgc1 = "Black"; break; |
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
| chown www-data:www-data -R * # Let Apache be owner | |
| find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x | |
| find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r-- | |
| #!/bin/bash | |
| cd /var/www/ | |
| sudo chown www-data:www-data -R * | |
| sudo find . -type d -exec chmod 775 {} \; | |
| sudo find . -type f -exec chmod 664 {} \; |
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
| <style> | |
| pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; } | |
| .string { color: green; } | |
| .number { color: darkorange; } | |
| .boolean { color: blue; } | |
| .null { color: magenta; } | |
| .key { color: red; } | |
| </style> | |
| <script> |
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
| function include(type, source){ | |
| //Includes external resources via injection | |
| var head = document.getElementsByTagName('head')[0]; | |
| switch(type){ | |
| case 'js': { | |
| resource = document.createElement('script'); | |
| resource.type = 'text/javascript'; | |
| resource.src = source; |
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
| readParameters(){ | |
| global | |
| Loop, %0% ; For each parameter: | |
| { | |
| param := %A_Index% ; Fetch the contents of the variable whose name is contained in A_Index. | |
| StringSplit, parameters, param, = | |
| if(ifValidParameter(parameters1)){ | |
| ;MsgBox, 4,, The value for %parameters1% is %parameters2%. Continue? | |
| %parameters1% = %parameters2% | |
| } |
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
| @echo off | |
| REM Carlos script to fix OneDrive | |
| REM Used to fix OneDrive after a password change | |
| REM to verify saved creds are deleted: rundll32.exe keymgr.dll, KRShowKeyMgr | |
| echo. | |
| echo Open Excel, Word, and signout from your Office 365 Account, then continue | |
| echo. | |
| pause | |
| REM Carlos script to fix OneDrive | |
| REM to verify saved creds are deleted: rundll32.exe keymgr.dll, KRShowKeyMgr |
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
| <VirtualHost *:443> | |
| ServerAdmin root@localhost.com | |
| ServerName proxy.mydomain.com | |
| SSLEngine on | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| SSLCertificateFile /etc/apache2/ssl/myssl.crt | |
| SSLCertificateKeyFile /etc/apache2/ssl/myssl.key | |
| SSLCertificateChainFile /etc/apache2/ssl/mysslcf.crt | |
| ProxyPreserveHost On | |
| <Proxy *> |
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
| <VirtualHost *:80> | |
| ServerName mydomain.com | |
| ServerAlias www.mydomain.com | |
| Redirect permanent / https://www.mydomain.com/ | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| </VirtualHost> | |
| <VirtualHost *:443> | |
| ServerName www.mydomain.com | |
| DocumentRoot /var/www/mysite |