Skip to content

Instantly share code, notes, and snippets.

View iwan-uschka's full-sized avatar

Christoph Wanja iwan-uschka

View GitHub Profile
@iwan-uschka
iwan-uschka / _dev
Last active May 29, 2021 14:37
dev command with auto-completion
#compdef dev
function _dev() {
# set auto completion result
_describe 'command' __DEV_AUTOCOMPLETION_LIST
}
@iwan-uschka
iwan-uschka / app.js
Last active December 31, 2020 08:58
create repetitive async callback
import createRepetitiveAsyncCallback from './createRepetitiveAsyncCallback';
const repetitiveAsyncCallbackInstance = createRepetitiveAsyncCallback({
asyncCallback: () => {
return doSomeAsyncStuffWeNeedToWaitFor();
},
interval: {
duration: 5000,
type: 'placid',
},
@iwan-uschka
iwan-uschka / Auth.js
Created October 16, 2019 07:55
Keycloak vs. React
import Keycloak from 'keycloak-js';
class Auth {
constructor() {
this.authenticated = false;
this.keycloak = Keycloak('/keycloak.json');
}
login(callback) {
this.keycloak