Skip to content

Instantly share code, notes, and snippets.

View marekkaczkowski's full-sized avatar

Marek Kaczkowski marekkaczkowski

View GitHub Profile
@marekkaczkowski
marekkaczkowski / utils.sh
Created June 23, 2020 11:48
Bash tips & tricks
#!/bin/bash
# Simple GeoIP lookup
IPVI="https://ipvigilante.com/$(sed -e 's/^"//' -e 's/"$//' <<<"$(dig TXT +short o-o.myaddr.l.google.com @ns1.google.com)")" && curl ${IPVI}
@marekkaczkowski
marekkaczkowski / n11n-i18n.js
Created May 24, 2018 12:52
Data normalization and internationalization with vue-18n
const raw = [
{u000011: { "name": "Foo" }},
{u000012: { "name": "Boo" }}
];
const n11n = raw.map(item => {
let id = String(Object.keys(item)[0])
let key = String(Object.keys(item[id]))
return {