Skip to content

Instantly share code, notes, and snippets.

View shadowlik's full-sized avatar
divide and conquer

Henrique Marques Fernandes shadowlik

divide and conquer
View GitHub Profile
@shadowlik
shadowlik / slugify.postgres.sql
Created February 21, 2023 19:00 — forked from abn/slugify.postgres.sql
A slugify function for postgres
-- original source: https://medium.com/adhawk-engineering/using-postgresql-to-generate-slugs-5ec9dd759e88
-- https://www.postgresql.org/docs/9.6/unaccent.html
CREATE EXTENSION IF NOT EXISTS unaccent;
-- create the function in the public schema
CREATE OR REPLACE FUNCTION public.slugify(
v TEXT
) RETURNS TEXT
LANGUAGE plpgsql
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@shadowlik
shadowlik / rabbitmq.txt
Created October 9, 2019 17:40 — forked from sdieunidou/rabbitmq.txt
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person