Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# Combine two non-duplex document feeder scansions into a single duplex pdf file.
#
# The input file should be procuded passing the document in the feeder (from the
# first page forward) and then passing it again on the backside (that is from
# the last page on backward).
#
# Tue Aug 8 20:41:26 CEST 2017, Andrea Leofreddi
#
@aleofreddi
aleofreddi / cognito_get_all_users.sh
Last active September 20, 2024 16:13
AWS Cognito: list all users
#!/bin/sh
#
# Dump AWS Cognito users as CSV output.
#
# Thu Jun 20 15:31:10 CEST 2019, Andrea Leofreddi
#
me="`basename $0`"
if [ $# != 1 ]; then
echo Usage: "$me" pool_id >&2
@aleofreddi
aleofreddi / gist:f800b25fe19e87f89d341ae29edcc36e
Created June 7, 2019 12:52
one liner yaml2json & json2yaml
# yaml2json
ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))' < hello.yaml
# json2yaml
ruby -ryaml -rjson -e 'puts YAML.dump(JSON.load(ARGF))' < hello.json