Skip to content

Instantly share code, notes, and snippets.

View oliverguenther's full-sized avatar

Oliver Günther oliverguenther

View GitHub Profile
@oliverguenther
oliverguenther / open_from_term
Created June 26, 2023 07:39
Open helper script for guake
!/bin/bash
name=$1
line=$2
file "${name}" | grep -q "text"
if [ $? -ne 0 ]; then
xdg-open ${name}
elif [[ ${name} == *"capybara/screenshot"* ]];then
@oliverguenther
oliverguenther / open_from_iterm.sh
Created September 6, 2017 13:33
iTerm2 Semantic history for IntelliJ / idea
#!/bin/bash
name=$1
line=$2
file "${name}" | grep -q "text"
if [ $? -ne 0 ]; then
/usr/bin/open ${name}
else
/usr/local/bin/idea --line ${line:-1} ${name}

Keybase proof

I hereby claim:

  • I am oliverguenther on github.
  • I am oliverguenther (https://keybase.io/oliverguenther) on keybase.
  • I have a public key whose fingerprint is 42BC 1289 F63A 0D19 7706 1D8E A3A8 BDAD 7C0C 552C

To claim this, I am signing this object:

@oliverguenther
oliverguenther / XYZtoLuv.pl
Created July 9, 2012 07:02
Perl snippet: Conversion from CIE 1931 XYZ color space to L* u* v*
#!/usr/bin/perl
use strict;
use warnings;
# Reference X_n , Y_n , Z_n default to 1
my ($Xn, $Yn, $Zn);
$Xn = $Yn = $Zn = 1;
@oliverguenther
oliverguenther / mytheme_get_headerimage.php
Created February 10, 2012 00:02
Drupal 7 Snippet: Select a header image based on the topmost active menu item
/**
* Return header image based on the node id of the topmost active menu item
* @return Absolute path to the image selected
*/
function get_header_image() {
// Get the Page's Parent Menu Item
$menuParent = menu_get_active_trail();
// background images based on node id's
$node_imgs = array(
@oliverguenther
oliverguenther / openpgpjstest.asc
Created December 20, 2011 14:12
openpgpjs testkey
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
mQENBE7seh8BCACxaw/TT7fOg5d0C0FWnGMMrfmpoUX3ufx3BCapzwBIMDNNOUfr
TJtqInWiIIDxoZKwuk8J/D2rsh4XcesK2AVw+eLjRP/mBDSIFskGIVPnvucn2MJJ
ASyYpL+RgwBCsYjDdcxJtvDZhpQDIaQBPbXJ6p9vL1hrJdqEcX/rh6fn0Eqz/+Re
tLG7y9+c4mw2ZkUnMdJDkVb43Ir8x4oem2ZKqzBw6cViyw4O5I4zYeYxeT7UYZ/+
aJ60phRc1Fhzbpd1nF+mKJiPGa2U6NwxZLb6gSdrF7kl9MszHevLPR4aJ5a14tkC
udsUHt8OKipglZauxbOMvhvVhoZ5doToVv7LABEBAAG0NU9wZW5QR1BKUyBUZXN0
IChUZXN0aW5nIG9wZW5wZ3BqcykgPG1haWxAZXhhbXBsZS5jb20+iQE4BBMBAgAi