Skip to content

Instantly share code, notes, and snippets.

View Makefile.podman-bridge
ARCH ?= arm64
VERSION ?= 20.10
SPIN ?= live-server
vftool ?= ./vftool/build/vftool
DATA ?= ./data
ISO := ubuntu-$(VERSION)-$(SPIN)-$(ARCH).iso
MOUNTPOINT := /Volumes/Ubuntu
CD := $(DATA)/$(ISO)
@addyosmani
addyosmani / lcp.js
Last active Nov 1, 2020
Largest Contentful Paint - Puppeteer
View lcp.js
const puppeteer = require('puppeteer');
const devices = require('puppeteer/DeviceDescriptors');
const Good3G = {
'offline': false,
'downloadThroughput': 1.5 * 1024 * 1024 / 8,
'uploadThroughput': 750 * 1024 / 8,
'latency': 40
};
View scratch.clj
(require '[clojure.core.async.impl.protocols :as impl]
'[clojure.core.async.impl.dispatch :as dispatch])
;;=> nil
(extend-type java.util.concurrent.CompletionStage
impl/ReadPort
(take! [this handler]
(.whenCompleteAsync this
(reify
@pashields
pashields / reading-list.md
Last active Dec 5, 2019
Some things to read
View reading-list.md

Why Read?

I find myself reading in two very different modes. In one mode, I'm trying to learn something specific typically to unblock me from another task. I might need to know details about a garbage collector or need to know how to write a small compiler. In other cases I'm getting exposed to something entirely new that I know nothing about (e.g lead scoring or purchasing) and need a crash course. It's hard to make general recommendations for this kind of reading. So much is up to the context of your particular topic.

In another mode, I'm trying to broaden my knowledge more generally. I can illuminate gaps in what I know and challenge biases that rarely get checked. In order for this to work, I have to free myself a bit from solving a particular problem. If my reading is a bit more aimless, I'm more likely to get a broader view.

How to read for a broader view

The biggest mistake I made in my youth was avoiding contradiction and ambiguity. When I read something, I was focused on whether I agreed wit

@mfikes
mfikes / clojurists-together-clojurescript.md
Last active Jul 31, 2018
Clojurists Together Q2 2018 Funding Round - ClojureScript
View clojurists-together-clojurescript.md

This page logs work being done under Clojurists Together Q2 2018 Funding Round towards the ClojureScript project. High level progress reports will be published formally with Clojurists Together, but you can follow here if you are interested in low-level details, progress notes, etc.

Themes

The concrete themes identified include:

  • Fixing CLJS-2702, which prevents us from upgrading to newer versions of Closure Library.
  • Work on highly voted ClojureScript tickets. Please take some time and vote in this list of tickets in need of patches.
  • Work on issues related to NPM dependency management. (In particular NPM issues in the list above will be given extra emphasis).
@mfikes
mfikes / CLJS-2702.md
Last active May 5, 2018
CLJS-2702: Accomodate new Closure Library dependency loading strategy
View CLJS-2702.md

This pages logs work being done on CLJS-2702 under Clojurists Together Q2 2018 Funding. Overall funding round work is being logged here.

This work in particular covers the first bullet:

  • Come up with a way to accommodate a recent change in the Closure Library that currently prevents ClojureScript from upgrading to newer versions of this library.

Work is being done in this branch, and when work is complete, the squashed results will be submitted as a patch.

01-May-2018

Evidently, internal changes have been made in Closure Library to accomodate a more sophisticated dependency tracking mechanism. ClosureScript relies on the internal details, and this is why things broke. Fortunately, it appears that—while s

View clojure.org[*Org Src clojure.clj
;;; `filter' **MAY** introduce chunkedness, therefore should only be used with
;;; pure functions.
(defn integers-from [n]
(lazy-seq (cons n (do (print \.) (integers-from (inc n))))))
;;; ⇒ #'user/integers-from
(defn chunked-test [xs]
(let [times-called (atom 0)
@BaseCase
BaseCase / dc_2017_biblio.md
Last active Jan 23, 2020
List of resources recommended or mentioned by the speakers at Deconstruct 2017
View dc_2017_biblio.md

Deconstruct 2017 Bibliography

Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!

DC 2017 Speakers' Choice Gold Medalist

  • Seeing Like a State by James Scott

Books

  • Public Opinion by Walter Lippmann (Evan Czaplicki)
  • A Pattern Language by Christopher Alexander (Brian Marick)
  • Domain Driven Design by Eric Evans (Brian Marick)
@pjstadig
pjstadig / core.clj
Created Mar 6, 2017
In Clojure you can fetch items from a map three different ways. Which should you use when?
View core.clj
(ns maps.core)
;; In Clojure you can fetch items from a map three different ways. Which should
;; you use when?
(= "bar" ({:foo "bar"} :foo)) ; map as function
(= "bar" (:foo {:foo "bar"})) ; key as function
(= "bar" (get {:foo "bar"} :foo)) ; `get` as function
;; <INCIDENTALLY>
@reborg
reborg / rich-already-answered-that.md
Last active Feb 10, 2021
A curated collection of answers that Rich gave throughout the history of Clojure
View rich-already-answered-that.md

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content