Skip to content

Instantly share code, notes, and snippets.

@tgk
tgk / pruttemaskine.ino
Created October 23, 2016 17:58
Fart machine for Rosalina - source
void fart(int pitch) {
int duration = random(300, 1000);
tone(8, pitch, duration);
delay(duration);
noTone(8);
}
int fartPitch() {
@tgk
tgk / aarhus_0001.clj
Created January 9, 2017 15:30
Notes from the first aarhus.clj meetup and dojo
;; Purpose of aarhus.clj and these meetups
;;; To get better
;;; To meet other Clojure peeps in Aarhus/East Jutland
;; Intro round
;;; Name, interests, experience with Clojure?
;; Agenda
;; Me talking (< 30m)
@tgk
tgk / sql.clj
Created June 26, 2020 08:51
Alternative to load-object
;; alternative strategy for navigating maps
(def rental-ad {:id 42, :car_id 56, :name_and_model "Peugeot 208"})
(follow rental-ad :name_and_model)
;; => "Peugeot 208"
(follow rental-ad :car)
;; => {:user_id 3, :car_type_id 5}
;; virtual fields map to multimethods that implement helpers
(sql/load :rental_ads 42 :car :user :picture_url)
;; => "https://..."
;; multimethods can look at meta information for maps
(meta rental-ad)
;; => {:table :rental_ads}
@tgk
tgk / plotswap.md
Last active November 20, 2022 10:18
Plot swap

Plotswap November 2022

This is an attempt at sharing plotting files and try our hands on files from other eager plot enthusiasts out there!

The (suggested) format is pretty simple: below is the list of participants in order. Each participant picks a file from the next name after their own on the list and plots it. The participants are also free to do some of the other plots, but this format ensures that everyone both tries their hand on plotting work by someone else and has one of their own works plotted.

Once a plot is done please post it on Mastodon and tag the other participants. Use the hashtag #plotswap (thanks @[email protected]!)

Each partiticipant can list (up to) three pieces we can pick from under their name. We will stick with SVGs for now as that seems to be the common format we all use.