Skip to content

Instantly share code, notes, and snippets.

View ignlg's full-sized avatar
👾
Killing invaders

Ignacio Lago ignlg

👾
Killing invaders
View GitHub Profile
@ignlg
ignlg / run-yaml.sh
Created February 22, 2023 08:32 — forked from lkoba/run-yaml.sh
#!/bin/bash
set -eo pipefail
json=$(y2j <"$1")
overrides=$(echo "$json" | jq "{spec}")
name=$(echo "$json" | jq -r ".metadata.name")
labels=$(echo "$json" | jq -r '.metadata.labels | keys[] as $k | "\($k)=\(.[$k])"' | paste -sd "," -)
image=$(echo "$json" | jq -r ".spec.containers[0].image")
@ignlg
ignlg / bw_export_kp.py
Last active March 31, 2020 18:20 — forked from mpalet/bw_export_kp.py
Export Bitwarden to KeePass 2 XML format, with custom banned fields to clean things up
#!python
"""
Exports a Bitwarden database into a KeePass file (kdbx) including file attachments, custom fields and folder structure.
It can also export an unencrypted XML KeePass file conforming to KeePass 2 XML format.
It requires keepassxc-cli, if not available it can still export KeePass 2 XML
- https://github.com/keepassxreboot/keepassxc
Usage: bw_export_kp.py [-h] [-x] [-d] [-bw-password None] [-kee-password None]
@ignlg
ignlg / gulpfile.coffee
Last active August 26, 2015 08:44 — forked from timthez/closer.js
Close tab on browserSync disconnection, Gulp example
browserSync = require 'browser-sync'
browserSync.use
plugin: ->
hooks:
'client:js': '
/* Close tab when server dies */
(function (bs) {
bs.socket.on("disconnect", function (client) { window.close(); });
})(___browserSync___);'