Skip to content

Instantly share code, notes, and snippets.

View alejandromav's full-sized avatar
👋
\' ;drop table users; --

Alejandro Martin alejandromav

👋
\' ;drop table users; --
View GitHub Profile
@alejandromav
alejandromav / Readme.md
Last active July 21, 2025 11:53
Self-managed Tinybird deployment - Minimal setup
@alejandromav
alejandromav / .env
Last active November 25, 2024 21:25
Plex setup Docker Compose
PUID=1000
PGID=1000
DOCKERUSERNAME=1000
DOCKERUSERGROUP=1000
MEDIADIR=/home/<username>/Media
USERDIR=/home/<username>
TZ=Europe/Madrid
@alejandromav
alejandromav / tinybird-mongodb-connector.sh
Last active June 28, 2023 08:45
Tinybird MongoDB Connector v0.0.0
FILE=~/tmp/items.ndjson
mongoexport \
--uri="mongodb://<user>:<pass>@alejandromav.mongodb.net/?retryWrites=true&w=majority" \
-d=my_db \
-c=Items \
-o=$FILE
curl \
-H 'Authorization: Bearer $TINYBIRD_APPEND_TOKEN' \
@alejandromav
alejandromav / timezones.json
Last active August 9, 2022 16:31
Timezone dictionary
{
"Africa/Abidjan": "CI",
"Africa/Accra": "GH",
"Africa/Addis_Ababa": "ET",
"Africa/Algiers": "DZ",
"Africa/Asmara": "ER",
"Africa/Bamako": "ML",
"Africa/Bangui": "CF",
"Africa/Banjul": "GM",
"Africa/Bissau": "GW",
@alejandromav
alejandromav / README.md
Last active June 22, 2022 09:43
Technical Product Manager, Data & Analytics

Technical Product Manager, Data & Analytics

We're looking for an experienced Technical Product Manager to join our team and help us build data and analytics products for internal use.

At Inditex, we're focused on our customers and you'll be able to reach millions of them with your passion and dedication. New ideas became incredible products and services, join us in building the future of eCommerce retailing.

Description

We are looking for a team member with a strong foundation in Computer Science theory and industry experience. In this role, you'll own and lead the roadmap of several internal tools.

@alejandromav
alejandromav / index.js
Created July 27, 2021 08:43
Get JavaScript object nested attributes
function propertiesToArray(obj) {
const isObject = val => typeof val === 'object' && !Array.isArray(val);
const isArray = val => Array.isArray(val);
// Format output keys
const addDelimiter = (a, b, type) => a ? `${a}.[${b}: ${type}]` : `[${b}: ${type}]`;
const paths = (obj = {}, head = '') => {
return Object.entries(obj).reduce((product, [key, value]) => {
let fullPath = addDelimiter(head, key, typeof value);
@alejandromav
alejandromav / README.md
Last active March 30, 2021 11:16
Certbot certificates generation

Install certbot

sudo apt update
sudo apt install certbot

Generate certificate with DNS challenge

@alejandromav
alejandromav / avro_wire_format_poc.js
Last active April 6, 2020 15:45
Avro Wire format
// https://docs.confluent.io/current/schema-registry/serializer-formatter.html#wire-format
const avro = require('avsc');
const schemas = {
1337: {
type: 'record',
fields: [
{name: 'name', type: 'string'}
]
@alejandromav
alejandromav / fix_wsl_dns.sh
Created March 23, 2020 10:24
Fix WSL DNS resolving for VPNs
#!/bin/bash
tmp=`mktemp`
powershell="/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe"
trap ctrlC INT
removeTempFiles() {
rm -f $tmp
}
@alejandromav
alejandromav / start-docker-containers.sh
Last active March 27, 2025 10:39
Docker start commands
# MySQL
docker run --rm \
--name mysql \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=toor \
-v ~/Data/mysql:/var/lib/mysql \
-d mysql \
--local_infile=1
# MongoDB