Skip to content

Instantly share code, notes, and snippets.

🚀

Robert Rossmann robertrossmann

🚀
Block or report user

Report or block robertrossmann

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@robertrossmann
robertrossmann / all-indexes.sql
Last active Jan 14, 2020
Postgres diagnostics
View all-indexes.sql
-- 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 Mar 11, 2020
TypeScript - Intellisense support for ES modules (_.mjs_ files)
View readme.md

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 Aug 10, 2017
Generate .icns bundle from a 1024x1024 png image
View mkicon.sh
#!/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"
View keybase.md

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 Aug 29, 2015
PHP - Compiling with Brew support
View PHP - Compiling with Brew support.md

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?

You can’t perform that action at this time.