Skip to content

Instantly share code, notes, and snippets.

View yannvanhalewyn's full-sized avatar
♥️
Making beautiful things

Yann Vanhalewyn yannvanhalewyn

♥️
Making beautiful things
  • Unconditional Software
  • Utrecht, Netherlands
View GitHub Profile
@yannvanhalewyn
yannvanhalewyn / db.cljs
Last active April 6, 2022 14:20
Subscribing to remote data with re-frame
(ns my-app.articles.db
(:require [my-app.http :as http]))
(http/reg-sub-remote
::articles
(fn []
{::http/path "/articles"
::http/method :post
::http/params {}
:db/path [:db/articles]
@yannvanhalewyn
yannvanhalewyn / build.boot
Last active December 13, 2017 17:37
Boot node cljs repl
(set-env!
:target-path "target"
:source-paths #{"src"}
:dependencies '[[org.clojure/clojure "1.9.0-RC1"]
[org.clojure/clojurescript "1.9.946"]
[figwheel-sidecar "0.5.14"]])
(require '[figwheel-sidecar.repl-api :as ra])
(deftask cljs-repl []

Keybase proof

I hereby claim:

  • I am yannvanhalewyn on github.
  • I am yannvanhalewyn (https://keybase.io/yannvanhalewyn) on keybase.
  • I have a public key ASBd9ROwFI2HRpfcb688aEChonV59TZzYew0JaGuFEnDbwo

To claim this, I am signing this object:

@yannvanhalewyn
yannvanhalewyn / gist:dd35a847896b2ef9f688
Created July 6, 2015 16:50
MySQL → MongoDB cheatsheet
# ==============
# # NOMENCLATURE
# ==============
Mongo | MySQL
-----------+-------
database | DATABASE
collection | TABLE
document | ENTRY
@yannvanhalewyn
yannvanhalewyn / Cpp makefile + Mac App packaging
Last active August 21, 2022 22:56
A generic makefile to generate a Mac OSX style .app package with resources (or compile a relatively big c++ project). All you need is code in a src/ dir, and eventually a Resources directory.
# Compiler
CC = g++
# Flags
CFLAGS = -c -Wall -std=c++11
LDLFLAGS = # -lSDL2 -lSDL2_mixer -lSDL2_ttf -framework OpenGL -framework CoreFoundation
# Directories
SRCDIR = src
OBJDIR = obj
BINDIR = bin