Skip to content

Instantly share code, notes, and snippets.


Robert Rossmann robertrossmann

View GitHub Profile
robertrossmann / all-indexes.sql
Last active Jun 30, 2020
Postgres diagnostics
View all-indexes.sql
-- List all existing indexes and include some useful info about them (incl. the index's definition)
schemaname AS schemaname,
t.relname AS tablename,
ix.relname AS indexname,
regexp_replace(pg_get_indexdef(i.indexrelid), '^[^\(]*\((.*)\)$', '\1') AS columns,
regexp_replace(pg_get_indexdef(i.indexrelid), '.* USING ([^ ]*) \(.*', '\1') AS algorithm,
indisunique AS UNIQUE,
indisprimary AS PRIMARY,
robertrossmann /
Last active Mar 11, 2020
TypeScript - Intellisense support for ES modules (_.mjs_ files)

TypeScript - Intellisense support for ES modules

This patch, based on commit, will add Intellisense support to projects which utilise the .mjs file extension for JavaScript modules.

⚠️ Warning

  • I have only used this from within tsserver. I did not attempt to use the tsc tool to do any kind of compilation of .mjs files.
  • This patch causes tsserver to treat all .mjs files as regular JavaScript files. This might be semantically wrong since these files have different semantics.

What works

robertrossmann /
Created Aug 10, 2017
Generate .icns bundle from a 1024x1024 png image
#!/usr/bin/env bash
# Takes a 1024x1024 png image and generates an .icns bundle with all the various icon sizes in it.
# Usage: /path/to/image.png
# Output is saved next to the input file as .icns file
filename=$(basename "${input}" .png)
iconset="$(dirname "${input}")/${filename}.iconset"
outfile="$(dirname "${iconset}")/${filename}.icns"

Keybase proof

I hereby claim:

  • I am robertrossmann on github.
  • I am rossmann ( on keybase.
  • I have a public key whose fingerprint is 1C79 8B6C 75C1 B1FD D632 A98A B881 03BF DF68 1AF5

To claim this, I am signing this object:

robertrossmann / PHP - Compiling with Brew
Last active Aug 29, 2015
PHP - Compiling with Brew support
View PHP - Compiling with Brew


If you have another version installed in the Brew's Cellar directory, make sure to brew unlink php it and possibly also delete the version folder.

Then, simply download the latest version of PHP source and run the configure command below, then continue as usual with make && make install. Afterwards, activate the installation by brew link php.

Note: You will need to install any pecl extensions (like xdebug) again after this procedure.