Skip to content

Instantly share code, notes, and snippets.

@ssheduardo
ssheduardo / openssl_encrypt_decrypt.php
Created November 26, 2019 12:55 — forked from joashp/openssl_encrypt_decrypt.php
Simple PHP encrypt and decrypt using OpenSSL
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/
@ssheduardo
ssheduardo / gist:55cbb13154a39f7853ea03a42c7d488f
Last active October 24, 2021 15:09
Localtunnel + laravel + docker + hostname
lt --port 80 --local-host "demo.local" --subdomain anything
#demo.local is configurated in your hosts
#127.0.0.1 -> demo.local
#subdomain -> this subdomain will create in localtunnel
#Localtunnel return: https://anything.loca.lt for example.
@ssheduardo
ssheduardo / ScheduleList.php
Created December 16, 2021 22:53 — forked from nvahalik/ScheduleList.php
PHP Artisan command that lists all scheduled tasks: php artisan schedule:list (Credit: https://stackoverflow.com/a/35559970/2714126)
<?php
namespace App\Console\Commands;
use Carbon\Carbon;
use Cron\CronExpression;
use Illuminate\Console\Command;
use Illuminate\Console\Scheduling\CallbackEvent;
use Illuminate\Console\Scheduling\Schedule;