Skip to content

Instantly share code, notes, and snippets.

rsms / Makefile
Last active Jul 1, 2021
Demonstrates a method for remote rendering with Skia. First run, then make and finally ./remote-render
View Makefile
SRCROOT := $(shell pwd)
SYSTEM := $(shell uname -s)
OBJDIR := .build
SKIA_DIR := skia
# skia-compatible config sourced from skia/out/Release/obj/
# via temporarily configuring Skia with skia_enable_tools=true
tkachenko1503 /
Last active Apr 21, 2020
Do we need types in JavaScript? Or maybe not?

This is my lightning talk submission to ReactiveConf 2018

In this talk, I want to share my experience gained during the development of frontend applications in several programming languages.

I think it's not a secret for anybody that developing large JavaScript applications is not so easy as it seems at first glance. We all want something simpler and more reliable. Therefore, many developers and even entire companies switch to different, compiled in JavaScript, programming languages. The bulk of such transitions is accounted for TypeScript and flow, and often, developers faced with more problems than they were before.

I wasn't the exception. Moving to a new project, I started using TypeScript and was disappointed. Luckily in my next project I used ClojureScript and it was like everything is illuminated!

View sablono-hacks.clj
(ns your.macros-for-cljs.ns
(:require [sablono.compiler :as sablono-c]))
;; Make sablono also walk into other forms:
;; if, for, let, do: Already exist
(.addMethod @(var sablono-c/compile-form) "when"
[[_ bindings & body]]
`(when ~bindings ~@(for [x body] (sablono-c/compile-html x)))))
kwf / pretty-pragmata.el
Last active Jul 15, 2021
Mappings for prettify-symbols-mode to enable Pragmata Pro's ligatures in Emacs. I've taken some slight liberties with the original ligature map, to suit my own tastes.
View pretty-pragmata.el
;; PRETTIFY SYMBOLS (with Pragmata Pro)
(defun setup-pragmata-ligatures ()
(setq prettify-symbols-alist
(append prettify-symbols-alist
'(("!!" . ?)
("!=" . ?)
("!==" . ?)
("!≡" . ?)
("!≡≡" . ?)
("!>" . ?)
DeLaGuardo / pragmatapro-font-lock-symbols-v2.el
Last active Jun 30, 2021
Snippet for support ligatures from PragmataPro font in Emacs
View pragmatapro-font-lock-symbols-v2.el
;; Enable ligatures without prettify-symbols
(provide 'add-pragmatapro-symbol-keywords)
(defconst pragmatapro-fontlock-keywords-alist
(mapcar (lambda (regex-char-pair)
`(,(car regex-char-pair)
(0 (prog1 ()
(compose-region (match-beginning 1)
(match-end 1)

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

fogus / gist:3123867
Created Jul 16, 2012 — forked from stuarthalloway/gist:2645453
Datomic queries against Clojure collections
View gist:3123867
;; Datomic example code
(use '[datomic.api :only (db q) :as d])
;; ?answer binds a scalar
(q '[:find ?answer :in ?answer]
;; of course you can bind more than one of anything
(q '[:find ?last ?first :in ?last ?first]
"Doe" "John")
View collector.erl
-export([start_link/1, do/2, ended/0]).
-export([handle_call/3, handle_cast/2]).
-export([init/1, terminate/2, handle_info/2, code_change/3]).
%% Client interface
View gist:2899967
#include <stdio.h>
#include <unordered_map>
#include <iostream>
using namespace std;
#define N 1000000
View tagged-parsing.js
clj.read_string("#queue [1 2 3]")
//=> #queue [1 2 3]