Skip to content

Instantly share code, notes, and snippets.

@pommi
pommi / mendix-in-docker10.sh
Created December 13, 2013 15:39
Now configure Mendix to use this database server.
root@host:~# curl -XPOST -d "DatabaseHost=172.17.0.4:5432" -d "DatabaseUserName=docker" -d "DatabasePassword=docker" -d "DatabaseName=docker" http://172.17.0.5:5000/config/
Config set.
root@host:~# curl -XGET http://172.17.0.5:5000/config/
{
"DatabaseHost": "172.17.0.4:5432",
"DTAPMode": "P",
"MicroflowConstants": {},
"BasePath": "/home/mendix",
"DatabaseUserName": "docker",
"DatabasePassword": "docker",
@pommi
pommi / mendix-in-docker11.sh
Last active December 31, 2015 06:09
Upload, unpack and start an MDA
root@host:~# curl -XPOST -F [email protected] http://172.17.0.5:5000/upload/
File uploaded.
root@host:~# curl -XPOST http://172.17.0.5:5000/unpack/
Runtime downloaded and Model unpacked.
root@host:~# # set config after unpack (unpack will overwrite your config)
root@host:~# curl -XPOST -d "DatabaseHost=172.17.0.4:5432" -d "DatabaseUserName=docker" -d "DatabasePassword=docker" -d "DatabaseName=docker" http://172.17.0.5:5000/config/
Config set.
root@host:~# curl -XPOST http://172.17.0.5:5000/start/
App started. (Database updated)
@pommi
pommi / mendix-in-docker12.sh
Created December 13, 2013 15:40
Check if the application is running
root@host:~# curl -XGET http://172.17.0.5:7000/
-- a lot of html --
root@host:~# curl -XGET http://172.17.0.5:7000/xas/
-- a lot of html --
root@host:~#
@pommi
pommi / trac2down.py
Last active October 9, 2019 00:55 — forked from sgk/trac2down.py
Trac Wiki to Markdown converter
#!/usr/bin/python
# vim:set fileencoding=utf-8 sw=2 ai:
# downloaded from https://gist.github.com/tcchau/4628317
# ... which is a fork from https://gist.github.com/sgk/1286682
import sqlite3
import datetime
import re
# additional imports --ah

Keybase proof

I hereby claim:

  • I am pommi on github.
  • I am pommib (https://keybase.io/pommib) on keybase.
  • I have a public key whose fingerprint is 84FE 4880 08DA C5FC B8CA 459B 20C2 D39D 50A8 EDDA

To claim this, I am signing this object:

@pommi
pommi / download-top2000-2018.sh
Last active December 26, 2021 20:01
Download the NPO Radio 2 Top 2000 2018
#!/bin/sh
for i in $(seq 25 31); do
curl -s https://www.nporadio2.nl/uitzendinggemist?date=$i-12-2018 | grep '/gemist/uitzending' | cut -d'"' -f 2 | xargs -i echo "https://www.nporadio2.nl{}" | tac >> pages
done
for p in $(cat pages); do
curl -s $p | grep broadcaststream | cut -d '"' -f 2 | xargs -i echo "https:{}" >> mp3
done
# remove the 1st 4 items (00:00-02:00, 02:00-04:00, 04:00-06:00, 06:00-08:00)
@pommi
pommi / get-accounts-recursive.sh
Created October 12, 2022 09:38 — forked from atheiman/get-accounts-recursive.sh
Get all accounts within an AWS Organizations organizational unit recursively (all accounts nested under any child OUs)
#!/bin/bash
if [ -z "$1" ]; then
echo "Error - Usage: $0 <parent-id>"
exit 1
fi
set -eu
# set -x