Skip to content

Instantly share code, notes, and snippets.

@Indigo744
Indigo744 / ProcessAsyncHelper.cs
Last active July 26, 2023 10:09 — forked from georg-jung/ProcessAsyncHelper.cs
The right way to run external process in .NET (async version)
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
/// <summary>
/// Process helper with asynchronous interface
/// - Based on https://gist.github.com/georg-jung/3a8703946075d56423e418ea76212745
/// - And on https://stackoverflow.com/questions/470256/process-waitforexit-asynchronously
/// </summary>
@Indigo744
Indigo744 / bcrypt_cost_calculator.php
Last active November 19, 2023 07:23 — forked from Antnee/password_hash_cost_calculator.php
PHP BCRYPT cost calculator
<?php
/**
* Password BCRYPT Hash Cost Calculator
*
* Just upload this script to your server and run it, either through CLI or by calling it in your browser.
*
* You should choose a cost that will take at least 100ms
*/
// Upper time limit to check
@Indigo744
Indigo744 / LanguageMatch
Created February 19, 2018 15:27 — forked from christianseel/LanguageMatch
LanguageMatch MODX Snippet – Redirects the visitor based on it's browser language
<?php
/**
* LanguageMatch
* Based on https://gist.github.com/christianseel/504302ce8ddfcde009c0
* Original code by http://stackoverflow.com/a/3771447
*
* Udated by Indigo74 for prefix/suffix and default context
*/
define('CONTEXT_PREFIX', 'web-');