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 June 13, 2024 19:00
Instructions for Docker swarm with GPUs
@reborg
reborg / rich-already-answered-that.md
Last active July 11, 2024 09:54
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 July 3, 2024 02:22
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@pauloricardomg
pauloricardomg / cors.nginxconf
Last active March 8, 2024 18:31
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

@lambder
lambder / gist:2066588
Created March 17, 2012 23:36
The Zen of R
# I am a scientist who has been using R for about 2 years. Today I achieved a measure of enlightenment into
# the zen of R, and I want to share it with you.
# I was simulating a set of independent random walks, which are formed by a multiplicative process. Here is
# the code I had built up over a few months of working on it and modifying it on and off as research
# questions changed:
TimeSteps <- 1000
Walks <- 100
ErrorMagnitude <- 0.03