Skip to content

Instantly share code, notes, and snippets.

View tolitius's full-sized avatar

Anatoly tolitius

View GitHub Profile
@ggeoffrey
ggeoffrey / jwt.clj
Last active February 16, 2024 07:57
Checking a JWT validity using JWKs in Clojure (tested with Cognito)
(ns services.jwt
(:require [buddy.sign.jwt :as jwt]
[clojure.data.codec.base64 :as b64]
[clojure.string :as str]
[cheshire.core :as json]
[buddy.core.keys :as keys] ;; You need to use [buddy/buddy-core "1.5.0-SNAPSHOT"]
[clojure.java.io :as io]))
(defn decode-b64 [str] (String. (b64/decode (.getBytes str))))
(defn parse-json [s]
Jenkinsfile VIM syntax highlighting
echo 'au BufNewFile,BufRead Jenkinsfile setf groovy' >> ~/.vimrc
@ipan
ipan / diff-jq.md
Created January 16, 2018 04:47
compare two JSONs with jq #json #jq
@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 1, 2024 09:43 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@stantonk
stantonk / multitail.sh
Created February 27, 2013 21:43
Unified tail -f of a log file across multiple hosts via ssh.
#!/bin/bash
HOSTS=(PUT, YOUR, HOSTS, HERE)
CMD="tail -f logs/api.log"
echo "Hit CTRL-C to stop"
sleep 0.5
PIDS=""
for host in ${HOSTS[*]}
do
@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code