start new:
tmux
start new with session name:
tmux new -s myname
SPC | |
SPC: find file | |
, switch buffer | |
. browse files | |
: MX | |
; EX | |
< switch buffer | |
` eval | |
u universal arg | |
x pop up scratch |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
const CrossOriginLocalStorage = function(currentWindow, iframe, allowedOrigins, onMessage) { | |
this.allowedOrigins = allowedOrigins; | |
let childWindow; | |
// some browser (don't remember which one) throw exception when you try to access | |
// contentWindow for the first time, it works when you do that second time | |
try { | |
childWindow = iframe.contentWindow; | |
} catch(e) { | |
childWindow = iframe.contentWindow; |
I made a documentation generator that cashes in on Clojure's dynamism. See the play-cljs docs (a ClojureScript game library) for an example of its output.
Like many of you, I've often wondered what my final regret will be on my deathbed. My best guess came to me in a dream recently. I was walking across the charred earth of an apocalyptic future world, maneuvering around the remains of the less fortunate. I was startled to find a young girl, barely holding onto her life. She murmured something to me. I asked her to repeat it, and she said more loudly: "I...wish your Clojure projects didn't have such crappy documentation."
#!/bin/sh | |
#_( | |
#_DEPS is same format as deps.edn. Multiline is okay. | |
DEPS=' | |
{:deps {clj-time {:mvn/version "0.14.2"}}} | |
' | |
#_You can put other options here | |
OPTS=' |
[ | |
{ | |
"bytes" : "2", | |
"description" : "Add with Carry", | |
"name" : "ADC", | |
"opcode" : "$69", | |
"mode" : "Immediate" | |
}, | |
{ | |
"opcode" : "$65", |
{"userCSSoptions":{"theme":"default","font":"font%3A%2016px%2F20px%20monospace","width":"400","height":"300","dock":"right","opacity":"100"},"userCSSstyles":[{"site":"play.hbomax.com","styles":"video{\n height: calc(100vh * 1.238) !important;\n top: calc(-100vh * 0.238/2) !important;\n}","toggle":1}]} |
(ns gjs-example.core) | |
(defn main [] | |
(set! (-> js/imports .-gi .-versions .-Gtk) "3.0") | |
(let [Gtk (doto (-> js/imports .-gi .-Gtk) (.init nil)) | |
window (Gtk.Window. | |
(clj->js | |
{:type (-> Gtk .-WindowType .-TOPLEVEL) | |
:title "A default title" | |
:default_width 300 |
#!/usr/bin/env bb | |
;; usage: | |
;; $ find-var.clj babashka.main/main src:test | |
;; example output: | |
;; src/babashka/main.clj:672:32 | |
;; src/babashka/main.clj:673:22 | |
;; src/babashka/main.clj:676:28 | |
;; test/babashka/test_utils.clj:31:59 |