Skip to content

Instantly share code, notes, and snippets.

@AdrianAulbach
AdrianAulbach / .bashrc
Created February 17, 2023 13:26
override/extend command in bashrc
# override cli program foo with additional optional parameter bar and change behaviour for parameter log (pipe it to less)
foo() {
if [["$1" == "bar" ]]; then
echo "foo bar";
command foo;
elif [[ "$1" == "log" ]]; then
command foo log | less;
else
command svn "$@"
fi
@AdrianAulbach
AdrianAulbach / pre-request-jwt.js
Created April 25, 2021 17:33 — forked from corbanb/pre-request-jwt.js
JWT tokenize - Postman Pre-Request Script
function base64url(source) {
// Encode in classical base64
encodedSource = CryptoJS.enc.Base64.stringify(source);
// Remove padding equal characters
encodedSource = encodedSource.replace(/=+$/, '');
// Replace characters according to base64url specifications
encodedSource = encodedSource.replace(/\+/g, '-');
encodedSource = encodedSource.replace(/\//g, '_');

Keybase proof

I hereby claim:

  • I am adrianaulbach on github.
  • I am aulbach (https://keybase.io/aulbach) on keybase.
  • I have a public key ASCzDNQjJ2YRcL04JegvEFqeXO4l_RjDPhvg2evc3YVAHQo

To claim this, I am signing this object:

@AdrianAulbach
AdrianAulbach / index.html
Created November 19, 2014 16:30
Show Bootstrap dropdown menus when js is disabled
<head>
<!-- [ Whatever you put in your <head> ] -->
<!-- link the noscript.css stylesheet only if javascript is disabled -->
<noscript>
<link rel="stylesheet" href="css/noscript.css" />
</noscript>
<!-- [ Rest of <head> ] -->
</head>
.navbar {
background-color: #E0EBE0;
background-image: url("../img/bg_menu_l.png");
background-position: center;
/* Wenn Hintergrundbild schmaler als Bildschirm ist (nicht unterstützt auf IE <= 8 */
/* background-repeat: repeat-y;*/
/* background-size: 200% 100%;*/
}
@AdrianAulbach
AdrianAulbach / slides.js
Last active December 26, 2015 06:19 — forked from remvee/slides.js
/*
Simple continuous slide show using JQuery.
Slightly changed usage (all slides must have the same size now):
*if JavaScript is disabled, now only the first slide is shown
*the placing of elements after the slideshow gets easier since one slide is always present in the background as placeholder
Usage:
<div id="slides">