Skip to content

Instantly share code, notes, and snippets.

@jgdoncel
jgdoncel / fn_remove_accents.sql
Last active March 19, 2025 13:06
MySQL Function to remove accents and special characters
DROP FUNCTION IF EXISTS fn_remove_accents;
DELIMITER |
CREATE FUNCTION fn_remove_accents( textvalue VARCHAR(10000) ) RETURNS VARCHAR(10000)
BEGIN
SET @textvalue = textvalue COLLATE utf8_general_ci;;
-- ACCENTS
SET @withaccents = 'ŠšŽžÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝŸÞàáâãäåæçèéêëìíîïñòóôõöøùúûüýÿþƒ';
@hartmannr76
hartmannr76 / README.md
Last active October 23, 2023 20:10
Flyway/Postgres Migration with Docker

Running

docker-compose -f docker-compose.migration.yml run flyway /opt/scripts/migrate.sh

@anabastos
anabastos / solidIsFp.md
Last active October 16, 2022 22:09
Solid is FP - Luiz Stangarlin

SOLID is FP!

So, I decided to write a little thing, only to practice writing, it's about SOLID being compared between class-based-OO and FP, and there will be grammar errors and there will be a lot of formatting errors, 'bear' with me as I type this as fast as I can. Also correct if I'm wrong. Warning, wall of text in English.

Single responsibility principle

" a class should have only a single responsibility "

A pure function is something with a single responsibility, turning its input into an output. What could be simpler?.

@grenzi
grenzi / Set-PsEnv.psm1
Last active February 21, 2023 23:11
sets powershell environment variables from python-dotenv formatted .env file
<#
.Synopsis
Exports environment variable from the .env file to the current process.
.Description
This function looks for .env file in the current directoty, if present
it loads the environment variable mentioned in the file to the current process.
based on https://github.com/rajivharris/Set-PsEnv
@neuberoliveira
neuberoliveira / random-emoji
Created February 18, 2019 14:38
Random GitMoji
#!/usr/bin/python
import sys
from random import randint
emojiList = [
":art:",
":zap:",
":fire:",
":bug:",
":ambulance:",
@leocavalcante
leocavalcante / up-n-running-k8s.md
Last active May 7, 2019 20:17
Up n Running K8s - Single-node, custom universal solution, right from a plain bare-metal server or VPS.

Up n Running K8s (step-by-step)

Single-node, custom universal solution, right from a plain bare-metal server or VPS.

OS

Ubuntu 18+ (All the steps below was made on a DigitalOcean $5 Droplet)

Here we go