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 | |
| /** | |
| * SimpleSMTPMailer Class | |
| * Author: Mario Flores Rey II <mr3y2@yahoo.com> | |
| * | |
| * Minimal, pure-PHP SMTP client for sending emails over SMTPS (implicit SSL on port 465). | |
| * Compatible with PHP 5.6.40+. Used for testing purposes only. Avoid production use. | |
| * | |
| * Usage: | |
| * $mailer = new SimpleSMTPMailer([ |
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 | |
| /** | |
| * Simple Turnstile Setup Testing | |
| * Author: Mario Flores Rey II <mr3y2@yahoo.com> | |
| * | |
| * Minimal, pure-PHP script for testing a Cloudflare Turnstile setup. | |
| * Compatible with PHP 5.6.40+. Remembers verification for N minutes. | |
| * | |
| * Not for production use. | |
| */ |
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 | |
| /** | |
| * Simple reCAPTCHA Setup Testing | |
| * Author: Mario Flores Rey II <mr3y2@yahoo.com> | |
| * | |
| * Minimal, pure-PHP script for testing a Google reCAPTCHA setup. | |
| * Compatible with PHP 5.6.40+. Remembers verification for N minutes. | |
| * Maximizes verification request that is currently at 10K usage cap. | |
| * | |
| * Limitation Notes: |
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
| from time import sleep | |
| import random | |
| from exponential_backoff import ExponentialBackoff | |
| def demo(iterations=1000): | |
| backoff = ExponentialBackoff(initial=3, maximum=10) # sleeps between 3 to 10 seconds | |
| def get_next_item(): |
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
| class ApiCache { | |
| static CACHE_KEY_PREFIX = '__API_CACHE__'; | |
| constructor(axios) { | |
| this.axios = axios.create(); | |
| this.axios.interceptors.request.use(this.requestInterceptor.bind(this)); | |
| } | |
| // djb2 hash function | |
| hash(str) { |
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
| using System.IO; | |
| using System.Security.Cryptography; | |
| namespace RsaFileCrypto | |
| { | |
| public class RsaFileHelper | |
| { | |
| // Signs a file using a private key (XML format), using a byte array | |
| public void SignFile(string inputFile, string signatureFile, string privateKeyXml) | |
| { |
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
| using System; | |
| using System.Timers; | |
| namespace MainPackage | |
| { | |
| class MainClass | |
| { | |
| private static Timer timer; | |
| static void Main(string[] args) |
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
| using System; | |
| using System.Collections.Generic; | |
| namespace Elapsed | |
| { | |
| public class ElapsedTimeService | |
| { | |
| public class ElapsedTime | |
| { | |
| public DateTime? Last { get; set; } |
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
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | |
| <assemblyIdentity | |
| version="1.0.0.0" | |
| processorArchitecture="X86" | |
| name="main" | |
| type="win32" | |
| /> | |
| <description>Elevated Privelege UAC Demo</description> | |
| <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> |
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
| using System; | |
| using System.IO; | |
| namespace Logger | |
| { | |
| public class TextLoggerService | |
| { | |
| private readonly string filePath; | |
| public TextLoggerService() |
NewerOlder