Skip to content

Instantly share code, notes, and snippets.

@danieldietrich
danieldietrich / FP_IN_JAVA.md
Last active December 6, 2015 17:43
A strong frame for functional programming in Java

A strong frame for functional programming in Java

Regarding functional programming in Java, the most important design rule is to avoid mutability. We use it only in places, where it makes sense and we use it internally, only, i.e. mutability does not leak to the outside as public API. Within the last years I deduced these three simple rules to achieve it:

Preamble

i. Don't try to create purely functional programs with Java. Simply spoken, Java is not the right language for that.

ii. It is most important to follow these rules consistently and make no exceptions other than stated.

@jrudolph
jrudolph / analysis.txt
Last active November 2, 2016 05:46
Release Train for 2.12.0-M3
TargetVersion: Scala 2.12.0-M3 LastVersion: Scala 2.11
25 libraries available for Scala 2.12.0-M3 (see the end for sbt config lines)
akka-actor 3 versions: 2.4.3, 2.4.2, 2.4.1
akka-stream 2 versions: 2.4.3, 2.4.2
akka-http 2 versions: 2.4.3, 2.4.2
akka-osgi 3 versions: 2.4.3, 2.4.2, 2.4.1
akka-slf4j 3 versions: 2.4.3, 2.4.2, 2.4.1
akka-testkit 3 versions: 2.4.3, 2.4.2, 2.4.1
scala-xml 1 versions: 1.0.5
@bylatt
bylatt / optimize-ssd.md
Last active April 4, 2018 20:36 — forked from ummels/os-x-enable-trim.md
Optimize non-Apple SSDs on OS X.

Optimize non-Apple SSDs on OS X. (Run the following commands in the terminal.)

Enable TRIM support

Check IOAHCIBlockStorage version:

open /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/version.plist
@leolimajr
leolimajr / os-x-enable-trim.txt
Created November 21, 2012 11:10 — forked from clarencesong/os-x-enable-trim.md
Enable TRIM in OS X 10.8.2 for IOAHCIBlockStorage version 2.3.1
Enable TRIM on non-Apple SSDs in OS X 10.8.2 Mountain Lion.
WARNING: This is ONLY tested on 10.8.2 (IOAHCIBlockStorage version 2.3.1), and NOT earlier or later versions.
Check /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/version.plist
Technical note: The driver changed in 10.8.2 and similar perl commands that worked in earlier OS X versions did not work for me once I updated to 10.8.2.
Run the following commands in Terminal…
@return1
return1 / trim_enabler.txt
Last active August 25, 2023 02:59
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
@bobby
bobby / datomic-helpers.clj
Created July 20, 2012 14:12
Some Datomic helpers I sometimes use with ring or pedestal-service apps
(ns datomic-helpers
(:require [datomic.api :as d]))
;;; Expose Datomic vars here, for convenience
;;; Ring middleware
(defn wrap-datomic
"A Ring middleware that provides a request-consistent database connection and
value for the life of a request."
@jalavik
jalavik / unicode_to_latex.py
Created May 17, 2011 11:04 — forked from beniwohli/unicode_to_latex.py
Map to convert unicode characters to their respective LaTeX representation
# original XML at http://www.w3.org/Math/characters/unicode.xml
# XSL for conversion: https://gist.github.com/798546
unicode_to_latex = {
u"\u0020": "\\space ",
u"\u0023": "\\#",
u"\u0024": "\\textdollar ",
u"\u0025": "\\%",
u"\u0026": "\\&",