Skip to content

Instantly share code, notes, and snippets.

View nicokosi's full-sized avatar

Nicolas Kosinski nicokosi

View GitHub Profile

Poker hand ranking

Write a function that tells you the best scoring for a given poker hand of 5 cards. For instance:

(score [[3 :diamonds] [3 :hearts] [3 :spades] [5 :hearts] [:king :clubs]])
=> :three-of-a-kind ;; three 3s

Cards are represented as a tuple of rank (number or name if it's a face card) and suit. Face card names are the keywords :ace, :king, :queen, :jack. Suits are :diamonds, :spades, :hearts, :clubs.

@yogthos
yogthos / clojure-beginner.md
Last active October 5, 2025 02:49
Clojure beginner resources

Introductory resources

@swlaschin
swlaschin / fsharpjobs.md
Last active January 27, 2025 07:24
My suggestions on how to look for F# jobs

How to find F# jobs

People often ask me how to find F# jobs. I don't have any special connections to companies using F#, and I don't have any special tricks either. I wish I did!

So, given that, here's my take on F# jobs.

Job hunting

For job hunting my suggestions are:

@swlaschin
swlaschin / booklist.md
Last active July 3, 2025 08:19
Some recommended books for improving as a software developer

Some recommended books for improving as a software developer

Most software books are too language specific and go out of date too quickly. What I find has stayed with me are books about bigger concepts, such as systems thinking and complexity, and also so-called "soft skills" such as management and psychology.

User experience

These are all really about developing empathy for other people :)

  • "The Design of Everyday Things" by Donald Norman
@s-petit
s-petit / new-bash.sh
Last active August 9, 2019 08:59
bash script bootstrap
#!/bin/bash
usage="$(basename "$0") [-h --help] [-v A_VALUE] -- bash script description
where:
-h or --help shows this help text"
optspec=":-:"
while getopts "$optspec" optchar; do
case "${OPTARG}" in
@daggerok
daggerok / install-mac-ports-no-root.bash
Last active August 18, 2025 16:46
Install MacPorts 2.5.3 without sudo / root privileges
# install
mkdir ~/macports
cd ~/macports
curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.5.3.tar.bz2
tar xf MacPorts-2.5.3.tar.bz2
cd MacPorts-2.5.3/
./configure --enable-readline --prefix=$HOME/macports --with-no-root-privileges
make && make install
@dpurjon
dpurjon / core-test.clj
Created September 26, 2017 20:26
A walktrough λ-calculus with Clojure
(ns lambda.core-test
(:require [clojure.test :refer :all]))
;; A walktrough λ-calculus with Clojure
;; based on Greg Michaelson book "An introduction to to functional programming through lambda calculus"
;; !!! DISCLAIMER !!!
;; ------------------
;; This document is 100% based on Greg Michaelson's book.
@jessfraz
jessfraz / boxstarter.ps1
Last active October 12, 2025 03:18
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@sroccaserra
sroccaserra / LApresMidiDuDDD.md
Last active September 25, 2018 19:37
Mes notes brutes sur l'après-midi du DDD
@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