- Postico client for mac
- pgcli - Postgres CLI with autocompletion and syntax highlighting
- pghero - Server and query performance dashboard
This file contains 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
;;; -*- lexical-binding: t -*- | |
(defun usr:match-pattern-backwards (pattern) | |
;;; XXX: Check if we hit (point-min)? | |
(cond ((integerp pattern) | |
(when (char-equal (char-before) pattern) | |
(backward-char) | |
t)) | |
((and (consp pattern) | |
(keywordp (car pattern))) |
This file contains 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
(defmethod sample ((input list) k &aux (length (length input))) | |
(assert (<= 1 k length)) | |
(let ((indices (loop with result = '() | |
with i = k | |
for j = (random length) | |
unless (member j result) | |
do (push j result) | |
(decf i) | |
while (< 0 i) | |
finally (return result)))) |
This file contains 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
(in-package #:cl-user) | |
(eval-when (:load-toplevel :compile-toplevel :execute) | |
(unless (find-package "WHO") | |
(require "cl-who"))) | |
(defun test () | |
(values | |
(who:with-html-output-to-string (html nil :prologue nil :indent nil) | |
(:span (who:str "whatever"))) |
This file contains 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
;; Alternative graphics: "⣀⣄⣤⣦⣶⣷⣿" or "⠆⡇⡷⣿" | |
(defun bar (stream width n max &optional (graphics "▏▎▍▌▋▊▉█")) | |
"Draw an N/MAX bar no wider than WIDTH using charecters from GRAPHICS." | |
(declare (type number width n max) | |
(type string graphics)) | |
(assert (<= 1 (length graphics)) | |
(graphics) | |
"Invalid graphics provided: ~S" graphics) | |
(let* ((nchars (length graphics)) | |
(inc (/ 1 nchars 2))) |
This file contains 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
(in-package #:pastelyser.log) | |
(defvar *categories* (make-instance 'cl-log:category-set)) | |
(macrolet ((defcategory (category &optional expands-as) | |
`(cl-log:defcategory ,category ,expands-as *categories*))) | |
(defcategory :hit) | |
(defcategory :critical) | |
(defcategory :error (or :error :critical)) | |
(defcategory :warning (or :warning :error)) |
I hereby claim:
- I am jdz on github.
- I am smuglispweenie (https://keybase.io/smuglispweenie) on keybase.
- I have a public key whose fingerprint is 057D C86F 35D8 3051 88C1 4E1A 1AB6 BD2A AC66 2788
To claim this, I am signing this object:
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am jdz on github. | |
* I am smuglispweenie (https://keybase.io/smuglispweenie) on keybase. | |
* I have a public key whose fingerprint is AC46 2D08 9883 7EC9 31DD 0799 9FC1 24B0 C3E5 B22E | |
To claim this, I am signing this object: |
This file contains 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
;;; The Ubuntu image file is 564MB, the largest file close to 1G I could | |
;;; quickly find. | |
(defun process (&optional (file #p"~/Downloads/ubuntu-14.04-server-amd64.iso")) | |
(declare (optimize (speed 3) (safety 1))) | |
(with-open-file (in file :direction :input | |
:element-type 'unsigned-byte) | |
(let ((buf (make-array #xffff :element-type '(unsigned-byte 8))) | |
(result 0)) | |
(loop for read = (read-sequence buf in) | |
until (zerop read) |