Skip to content

Instantly share code, notes, and snippets.

View robertrossmann's full-sized avatar
🚀

Robert Rossmann robertrossmann

🚀
View GitHub Profile
@robertrossmann
robertrossmann / all-indexes.sql
Last active January 26, 2024 03:00
Postgres diagnostics
-- List all existing indexes and include some useful info about them (incl. the index's definition)
SELECT
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
robertrossmann / readme.md
Last active November 25, 2021 15:04
TypeScript - Intellisense support for ES modules (_.mjs_ files)

TypeScript - Intellisense support for ES modules

This patch, based on commit https://github.com/Microsoft/TypeScript/commit/beebda3574be7f9a51f33ac24ab117f696ca9055, 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
robertrossmann / mkicon.sh
Created August 10, 2017 08:18
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: mkicon.sh /path/to/image.png
# Output is saved next to the input file as .icns file
input=$1
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 (https://keybase.io/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
robertrossmann / PHP - Compiling with Brew support.md
Last active August 29, 2015 14:13
PHP - Compiling with Brew support

Usage

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.

Apache?