Skip to content

Instantly share code, notes, and snippets.

🌱
photosynthesizing

Tom H. tomisme

🌱
photosynthesizing
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
View cVimrc
set autoupdategist
set defaultnewtabpage
set smoothscroll
map h previousTab
map l nextTab
map J scrollPageDown
map K scrollPageUp
let blacklists = ["*://mail.google.com/*", "*://keep.google.com/*", "*://wanikani.com/*", "*://localhost/*"]
@tomisme
tomisme / gpg.sh
Last active Feb 23, 2016
Handy gpg(1) commands
View gpg.sh
# 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
@tomisme
tomisme / packages.sh
Last active Feb 17, 2017
arch package management commands (https://github.com/aurapm/aura)
View packages.sh
# check for updates for installed (non AUR) packages
checkupdates
# update (non AUR) packages
aura -Syu
# update all installed AUR packags (after looking at diffs)
aura -Akua
# check diff / update single AUR package
View imagemagick.sh
# convert a spritesheet into individual files
convert bigset.png -crop 24x24 icon.png
View git.sh
# undo changes since last commit
git checkout <FILENAME> # . for all in current folder
View async_await1.js
function resolveAfter2Seconds(x) {
return new Promise(resolve => {
setTimeout(() => {
resolve(x);
}, 2000);
});
}
async function add1(x) {
var a = resolveAfter2Seconds(20);
View keybase.md

Keybase proof

I hereby claim:

  • I am tomisme on github.
  • I am tomisme (https://keybase.io/tomisme) on keybase.
  • I have a public key ASAit6TzgJM18CJAoU4STuv1-nHToC557iGm4-8bbACzkgo

To claim this, I am signing this object:

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);
@tomisme
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 dlet.clj
;; From e.g. https://github.com/scottjad/uteal
(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))]
~@body))
You can’t perform that action at this time.