Skip to content

Instantly share code, notes, and snippets.

View Radiergummi's full-sized avatar
Yes of course I can implement that 🥲

Moritz Friedrich Radiergummi

Yes of course I can implement that 🥲
View GitHub Profile
themsaid / AppServiceProvider.php
Created January 26, 2020 16:24
Re-encryption after APP_KEY rotation
View AppServiceProvider.php
namespace App\Providers;
use App\Encrypter;
use Illuminate\Support\Str;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
ryanwinchester / bitwise.php
Last active August 15, 2023 05:16
BITWISE FLAGS for Custom PHP Objects
View bitwise.php
* BITWISE FLAGS for Custom PHP Objects
* @link
* Sometimes I need a custom PHP Object that holds several boolean TRUE or FALSE values.
* I could easily include a variable for each of them, but as always, code has a way to
* get unweildy pretty fast. A more intelligent approach always seems to be the answer,
khakimov / gist:3558086
Created August 31, 2012 19:49
Matrix Effect in you terminal
View gist:3558086
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'