Skip to content

Instantly share code, notes, and snippets.

View tflori's full-sized avatar

Thomas Flori tflori

  • Munich
View GitHub Profile
@tflori
tflori / setYamlValue.sh
Created April 29, 2020 19:52
Simple yaml setter
IFS='.'
read -ra keyToSet <<< $1
commentPattern="^ *(#|$)"
current=${keyToSet[0]}
keyToSet=("${keyToSet[@]:1}")
currentIndent=0
currentPattern="^ {${currentIndent}}${current} *:"
nextIndent=0
while read line; do
@tflori
tflori / 3-way-switch.markdown
Created February 24, 2020 16:30
3-way-switch
@tflori
tflori / PasswordStrength.php
Created January 4, 2019 14:40
Password strength validation for verja
<?php
namespace App\Validator;
use Verja\Error;
use Verja\Validator;
class PasswordStrength extends Validator
{
/** @var int */
@tflori
tflori / fasta.php
Last active December 21, 2016 08:22
fasta php
<?php
/* The Computer Language Benchmarks Game
http://benchmarksgame.alioth.debian.org/
contributed by Thomas Flori
*/
while (ob_get_level()) ob_end_clean();
ini_set('memory_limit', '512M');
@tflori
tflori / SassMeister-input-HTML.html
Last active August 29, 2015 14:24
Generated by SassMeister.com.
<input id="example" type=text value="Example" />
@tflori
tflori / SassMeister-input-HTML.html
Created July 14, 2015 12:41
Generated by SassMeister.com.
<input id="example" type=text value="Example" />