Skip to content

Instantly share code, notes, and snippets.

playing with frogs

Tom H. tomisme

playing with frogs
Block or report user

Report or block tomisme

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Boot from an Arch USB Drive
# Connect to the internet
# Mount partitions
mount /dev/nvme0n1p1 /mnt/boot
mount /dev/nvme0n1p2 /mnt
View dlet.clj
;; From e.g.
(defmacro dlet
"let with inspected bindings"
[bindings & body]
`(let [~@(mapcat (fn [[n v]]
(if (or (vector? n) (map? n))
[n v]
[n v '_ `(println (name '~n) ":" ~v)]))
(partition 2 bindings))]
tomisme / get_available_namespaces.cljs
Created May 6, 2018
get available namespaces in clojurescript
View get_available_namespaces.cljs
; self-hosted env
(-> @cljs.env/*compiler* :cljs.analyzer/namespaces keys)
;; non-self-hosted env
(defmacro namespaces [] `'~(cljs.analyzer.api/all-ns))
View servicesMap.ts
type Constructor<T> = new (...args: any[]) => T;
const servicesMap = new Map();
servicesMap.set(ImsItemPanelService, imsItemPanelService);
servicesMap.set(OverviewService, overviewService);
servicesMap.set(HelpPanelService, helpPanelService);
export function getService<T>(ClassName: Constructor<T>): T {
return servicesMap.get(ClassName);

Keybase proof

I hereby claim:

  • I am tomisme on github.
  • I am tomisme ( on keybase.
  • I have a public key ASAit6TzgJM18CJAoU4STuv1-nHToC557iGm4-8bbACzkgo

To claim this, I am signing this object:

View async_await1.js
function resolveAfter2Seconds(x) {
return new Promise(resolve => {
setTimeout(() => {
}, 2000);
async function add1(x) {
var a = resolveAfter2Seconds(20);
# undo changes since last commit
git checkout <FILENAME> # . for all in current folder
# convert a spritesheet into individual files
convert bigset.png -crop 24x24 icon.png
tomisme /
Last active Feb 17, 2017
arch package management commands (
# check for updates for installed (non AUR) packages
# update (non AUR) packages
aura -Syu
# update all installed AUR packags (after looking at diffs)
aura -Akua
# check diff / update single AUR package
tomisme /
Last active Feb 23, 2016
Handy gpg(1) commands
# encrypt message stored in a file and print to stdout
gpg -a -o - -r RECIPIENT -e INPUT_FILE
# decrypt message from clipboard
xclip -o | gpg -d
# import public/private keys from clipboard
xclip -o | gpg --import
# delete public key
You can’t perform that action at this time.