Skip to content

Instantly share code, notes, and snippets.

@adamamyl
adamamyl / recursively-bulk-dasel.sh
Created July 6, 2023 13:34
One-liner to recursively convert json to csv
# `brew install dasel` if needed…
find . -name "*.json" -type f -exec bash -c 'dasel -r json -w csv < "$0" > "${0%json}csv"' {} \;
# and to purge the jsons…
#find . -name "*.json" -type f -delete
@adamamyl
adamamyl / samba_backup.sh
Created November 5, 2018 10:43 — forked from muyesh/samba_backup.sh
samba_backup script for Ubuntu 14.04
#!/bin/sh
#
# Copyright (C) Matthieu Patou <mat@matws.net> 2010-2011
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@adamamyl
adamamyl / float-ledger-watermark-checker.sh
Last active September 18, 2018 19:34
A dirty bash script to check the levels of a ledger with watermark; see the help guide on guides.railsbank.com for more context.
#! /usr/local/bin/bash
set -e
# set this to be your ledger's ledger_id
floatledgerid=some-ledger-uuid
# this is perhaps a little more than needed,
# but we use Keychain Access for our API Keys — it
# has a simple interface that works in scripts
if [[ "$OSTYPE" == "darwin"* ]]; then
@adamamyl
adamamyl / -
Created January 10, 2018 15:51
#!/bin/bash
#
# keychain-search:
set -e
if [ -z $1 ]; then
echo "Specify thing to look for as argument"
echo "Maybe you want one of:
adam-stage-play adam-beta-play adam-play
@adamamyl
adamamyl / utfmb64.conf
Created September 11, 2017 16:20
utf8 for mysql
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
May-06 20
Jun-06 18
Jul-06 9
Aug-06 28
Sep-06 43
Oct-06 14
Nov-06 22
Dec-06 14
Jan-07 29
Feb-07 39
@adamamyl
adamamyl / gist:4e16931b1c41be0ed906
Created February 17, 2016 16:30
get gpg keys for people in an addressbook dump (where the email address is the last field)
awk '{print $NF}' addressbook.csv | head | while read L; do gpg --keyserver pgp.mit.edu --search-keys ${L}; done

Keybase proof

I hereby claim:

  • I am adamamyl on github.
  • I am adamamyl (https://keybase.io/adamamyl) on keybase.
  • I have a public key whose fingerprint is F342 2EB6 5394 A8B5 0C3A 6EC4 B20F 50D4 855B 3066

To claim this, I am signing this object: