Skip to content

Instantly share code, notes, and snippets.

View steshaw's full-sized avatar
👨‍💻
Loves programming languages

Steven Shaw steshaw

👨‍💻
Loves programming languages
View GitHub Profile

Standardized Ladder of Functional Programming

The LambdaConf Ladder of Functional Programming (LOFP) is a standardized progression of different concepts and skills that developers must master on their journey to becoming expert-level functional programmers. LOFP can be used to rank workshops, talks, presentations, books, and courseware, so that aspiring functional programmers have a better understanding of what material is appropriate for them given their current experience.

Fire Keramik

Concepts

  • Immutable Data
  • Second-order Functions
@saurabhnanda
saurabhnanda / spacemacs.el
Created November 20, 2016 17:13
spacemacs file
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@klingerf
klingerf / blue-green.groovy
Created November 4, 2016 03:10
Jenkins pipeline script to perform blue-green deploys to a Kubernetes cluster running linkerd and namerd
node {
def currentVersion = getCurrentVersion()
def newVersion = getNextVersion(currentVersion)
def frontendIp = kubectl("get svc l5d -o jsonpath=\"{.status.loadBalancer.ingress[0].ip}\"").trim()
def originalDst = getDst(getDtab())
stage("clone") {
git url: gitRepo + '.git', branch: gitBranch
}
@adambom
adambom / README.md
Last active May 27, 2024 07:51
Backup Kubernetes Cluster State

Run this in order to backup all you k8s cluster data. It will be saved in a folder bkp. To restore the cluster, you can run kubectl apply -f bkp.

Please note: this recovers all resources correctly, including dynamically generated PV's. However, it will not recover ELB endpoints. You will need to update any DNS entries manually, and manually remove the old ELB's.

Please note: This has not been tested with all resource types. Supported resource types include:

  • services
  • replicationcontrollers
  • secrets
  • deployments
  • horizontal pod autoscalers
@saurabhnanda
saurabhnanda / extending-opaleye.md
Last active November 26, 2017 09:43
Extending Opaleye

Context

As a user of Opaleye, I feel that Opalaye's public API is missing a number of features/niceties that are required by most people using the library in a largish project. The number of separate projects trying to close these gaps seem to strengthen this point:

Based on the discussion at silkapp/girella#9, specifically Tom's approval in that thread, this is an effort to build consensus around features that Opaleye's users would like to see in the core library directly. Of course, these features should not compromise general principles that @tomjaguarpaw has specifically mentioned:

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@Profpatsch
Profpatsch / hasklig.el
Created August 31, 2016 16:23
Getting Hasklig to work in Emacs
;; nice glyphs for haskell with hasklig
;; copied that code from some pastebin, but forgot where
(custom-set-variables '(haskell-font-lock-symbols t)
'(haskell-font-lock-symbols-alist
(and (fboundp 'decode-char)
(list (cons "&&" (decode-char 'ucs #XE100))
(cons "***" (decode-char 'ucs #XE101))
(cons "*>" (decode-char 'ucs #XE102))
(cons "\\\\" (decode-char 'ucs #XE103))
(cons "||" (decode-char 'ucs #XE104))
@snoyberg
snoyberg / upper-bounds.md
Created May 27, 2016 03:13
Michael Snoyman's personal take on PVP version upper bounds

In response to a request on Reddit, I'm writing up my thoughts on PVP upper bounds. I'm putting this in a Gist since I don't want to start yet another debate on the matter, just provide some information to someone who asked for it. Please don't turn this into a flame war :)

For those unaware: the Package Versioning Policy is a set of recommendations covering how to give version numbers to your packages, and how to set upper and lower bounds on your dependencies.

I'll start by saying: I support completely with the PVP's recommendations on how to assign version numbers. While there are plenty of points in this design space, the PVP is an unobjectionable one, and consistency in the community is good. On multiple occasions, I have reached out to package authors to encourage compliance with this. (However, I've always done so privately, as opposed to a statement on Reddit, as I believe that to be a more likely route to successful convincing.)

The issue aro

@martijnvermaat
martijnvermaat / nixos.md
Last active August 7, 2025 19:44
Installation of NixOS with encrypted root
@aaronlevin
aaronlevin / config.nix
Created April 21, 2016 10:49
Use Nix to build vim with +python support + custom python libraries
# I wanted to use ensime with vim, which requires vim + python + some python packages (websocket_client + sexpdata)
# unfortunately, nix would build vim with a python that didn't have access to my system libraries (for referential transperancy)
# so I needed to provide to `vim_configurable.nix` the right python to use *and* enable python, lua, etc. support.
# I also wanted to keep my `.vimrc` separate because some of the vim packages I use weren't available.
#
# install via: `nix-env -f '<nixpkgs>' -iA myCoolVim` or `nix-env -I nixpkgs=/path/to/your/nixpkgs -f '<nixpkgs>' -iA myCoolVim`
#
# out put of `vim --version` below.
{