Skip to content

Instantly share code, notes, and snippets.

View joelkuiper's full-sized avatar

Joël Kuiper joelkuiper

View GitHub Profile
@jackrusher
jackrusher / json->edn.el
Created April 16, 2020 13:26
Convert the current region in emacs from JSON to EDN using Bork's Jet.
;; Uses https://github.com/borkdude/jet
;; On OSX, install jet with:
;; brew install borkdude/brew/jet
;; I invoke this with M-x, you might want to bind it to a key
(defun json->edn ()
(interactive)
(shell-command-on-region (region-beginning)
@tomlankhorst
tomlankhorst / docker-swarm-gpu.md
Last active November 7, 2025 13:41
Instructions for Docker swarm with GPUs
@reborg
reborg / rich-already-answered-that.md
Last active October 17, 2025 18:52
A curated collection of answers that Rich gave throughout the history of Clojure

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

@ducky427
ducky427 / core.cljs
Created June 11, 2015 11:31
Facebook's fixed data for reagent. Adapted from https://github.com/ul/fixed-data-table-demo
(ns datatable.core
(:require [reagent.core :as reagent]
[cljsjs.fixed-data-table]))
(def Table (reagent/adapt-react-class js/FixedDataTable.Table))
(def Column (reagent/adapt-react-class js/FixedDataTable.Column))
(defn gen-table
"Generate `size` rows vector of 4 columns vectors to mock up the table."
[size]
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active November 5, 2025 13:48
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@pauloricardomg
pauloricardomg / cors.nginxconf
Last active July 7, 2025 05:14
Nginx configuration for CORS-enabled HTTPS proxy with origin white-list defined by a simple regex
#
# Acts as a nginx HTTPS proxy server
# enabling CORS only to domains matched by regex
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/
#
# Based on:
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html
# * http://enable-cors.org/server_nginx.html
#
server {
export MKLROOT="/opt/intel/composer_xe_2013.3.171/mkl"
export MKL_LIB_PATH="/opt/intel/composer_xe_2013.3.171/mkl/lib"
export MKL=" -L${MKLROOT}/lib ${MKLROOT}/lib/libmkl_blas95_ilp64.a ${MKLROOT}/lib/libmkl_lapack95_ilp64.a -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lmkl_gf_ilp64"
export ICC_LIBS="/opt/intel/composer_xe_2013.3.171/mkl/lib"
export IFC_LIBS="/opt/intel/composer_xe_2013.3.171/compiler/lib/intel64"
export CC="icc -std=c99 -arch x86_64"
export CFLAGS="-g -O2 -fPIC -DPIC -DMKL_ILP64 -I${MKLROOT}/include -ip -mp -wd188"
export F77="ifort -arch x86_64"
export FFLAGS="-g -O2 -fPIC -I${MKLROOT}/include/intel64/ilp64 -I${MKLROOT}/include -ip -mp"
export CPICFLAGS="-fPIC -DPIC"
export MKLROOT="/opt/intel/composer_xe_2013.3.171/mkl"
export MKL=" -L${MKLROOT}/lib ${MKLROOT}/lib/libmkl_blas95_ilp64.a ${MKLROOT}/lib/libmkl_lapack95_ilp64.a -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -lmkl_gf_ilp64"
export arch=x86_64
export r_arch=x86_64
export CC="gcc -arch x86_64 -std=gnu99"
export CXX="g++ -arch x86_64"
export OBJC="clang"
export F77="gfortran -arch x86_64"
export FC="gfortran -arch x86_64"
export CFLAGS='-g -O2'
@stuartsierra
stuartsierra / lein2-issue.md
Created July 6, 2012 21:04
'file:' repositories in Leiningen 2.0.0-preview5 and later

Sample Project

Starting from:

lein new foo
cd foo

Say I have a random JAR file that is not available in any repository:

touch README.md

@michiel
michiel / cors-nginx.conf
Created July 5, 2011 10:41
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#