Given an encoded (base64) JWT (access_token).
For example, see this sample OAuth2 response generated by JBoss APIMan/Keycloak
HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: application/json
Date: Tue, 25 Aug 2015 19:25:12 GMT
| ;;; package --- Fix permissions for Emacs.app on macOS Catalina | |
| ;;; Author: Artem Loenko | |
| ;;; Mail-To: <artyom.loenko@mac.com> | |
| ;;; Commentary: | |
| ;;; Code: | |
| (defconst _default-emacs-app-plist-path "/Applications/Emacs.app/Contents/Info.plist") | |
| (defconst _temp-buffer-name "*fixing Emacs permissions*") | |
| (defconst _temp-buffer (get-buffer-create _temp-buffer-name)) | |
| (with-current-buffer _temp-buffer (erase-buffer)) |
| ;; TRAMP gcloud ssh | |
| (add-to-list 'tramp-methods | |
| '("gssh" | |
| (tramp-login-program "gssh") | |
| (tramp-login-args (("%h"))) | |
| (tramp-async-args (("-q"))) | |
| (tramp-remote-shell "/bin/sh") | |
| (tramp-remote-shell-args ("-c")) | |
| (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") | |
| ("-o" "UserKnownHostsFile=/dev/null") |
| # By default, Docker containers run as the root user. This is bad because: | |
| # 1) You're more likely to modify up settings that you shouldn't be | |
| # 2) If an attacker gets access to your container - well, that's bad if they're root. | |
| # Here's how you can run change a Docker container to run as a non-root user | |
| ## CREATE APP USER ## | |
| # Create the home directory for the new app user. | |
| RUN mkdir -p /home/app |
Given an encoded (base64) JWT (access_token).
For example, see this sample OAuth2 response generated by JBoss APIMan/Keycloak
HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: application/json
Date: Tue, 25 Aug 2015 19:25:12 GMT
NOTE: a more up-to-date version of this can be found on my blog
A few days ago, version 1.9 of the Nix package manager was released. From the release notes:
nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.
| import logging | |
| import uuid | |
| import time | |
| from mesos.interface import Scheduler | |
| from mesos.native import MesosSchedulerDriver | |
| from mesos.interface import mesos_pb2 | |
| logging.basicConfig(level=logging.INFO) |
| (defun clocktable-by-tag/shift-cell (n) | |
| (let ((str "")) | |
| (dotimes (i n) | |
| (setq str (concat str "| "))) | |
| str)) | |
| (defun clocktable-by-tag/insert-tag (params) | |
| (let ((tag (plist-get params :tags))) | |
| (insert "|--\n") | |
| (insert (format "| %s | *Tag time* |\n" tag)) |
| ;; based on core.logic 0.8-alpha2 or core.logic master branch | |
| (ns sudoku | |
| (:refer-clojure :exclude [==]) | |
| (:use clojure.core.logic)) | |
| (defn get-square [rows x y] | |
| (for [x (range x (+ x 3)) | |
| y (range y (+ y 3))] | |
| (get-in rows [x y]))) |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |