This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bb | |
| (ns oidc-client | |
| "Get end-user access token from an OIDC provider, caching the access/refresh token in an encrypted file. Code in https://babashka.org | |
| Usage: | |
| /path/to/oidc_client.clj | |
| When there are no cached, valid tokens, it will open a browser with the OIDC provider login URL and start a HTTPS-enabled | |
| callback server on localhost. Make sure that the resulting redirect_uri is registered with your provider. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Copyright (c) James Reeves. All rights reserved. | |
| ;; The use and distribution terms for this software are covered by the Eclipse | |
| ;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which | |
| ;; can be found in the file epl-v10.html at the root of this distribution. By | |
| ;; using this software in any fashion, you are agreeing to be bound by the | |
| ;; terms of this license. You must not remove this notice, or any other, from | |
| ;; this software. | |
| (ns compojure.server.jetty | |
| "Clojure interface to start an embedded Jetty server." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns clipboard.core | |
| (:require [fipp.edn :as fipp]) | |
| (:import (java.awt.datatransfer DataFlavor Transferable StringSelection) | |
| (java.awt Toolkit) | |
| (java.io StringWriter)) | |
| (defn get-clipboard | |
| "get system clipboard" | |
| [] | |
| (-> (Toolkit/getDefaultToolkit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # kubernetes - is an open source system for managing containerized | |
| # applications across multiple hosts, providing basic mechanisms for | |
| # deployment, maintenance, and scaling of applications. | |
| # See: https://kubernetes.io | |
| function __kubectl_no_command | |
| set -l cmd (commandline -poc) | |
| if not set -q cmd[2] | |
| return 0 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function __git_fzf_is_in_git_repo | |
| command -s -q git | |
| and git rev-parse HEAD >/dev/null 2>&1 | |
| end | |
| function __git_fzf_git_status | |
| __git_fzf_is_in_git_repo; or return | |
| git -c color.status=always status --short | \ | |
| fzf -m --ansi --preview 'git diff --color=always HEAD -- {-1} | head -500' | \ | |
| cut -c4- | \ |