Skip to content

Instantly share code, notes, and snippets.

View GenesesLopes's full-sized avatar

Gêneses Lopes GenesesLopes

  • Valença - Bahia - Brazil
View GitHub Profile
@imacruz
imacruz / EncryptDecryptFromDatabase.php
Created May 25, 2023 20:46
Criptograr e descriptografar usando aes_encript
<?php
private function getAppKey(): string
{
return config("app.aes_key");
}
function encrypt(string $data): string
{
$key = $this->getAppKey();
@gabrielfroes
gabrielfroes / slugify.js
Last active February 6, 2024 23:36 — forked from mathewbyrne/slugify.js
Javascript Slugify
/*
Create SLUG from a string
This function rewrite the string prototype and also
replace latin and other special characters.
Forked by Gabriel Froes - https://gist.github.com/gabrielfroes
Original Author: Mathew Byrne - https://gist.github.com/mathewbyrne/1280286
*/
if (!String.prototype.slugify) {
String.prototype.slugify = function () {