Skip to content

Instantly share code, notes, and snippets.

Avatar

Cies Breijs cies

View GitHub Profile
View BRANCHING.md

Stager's git branching strategy

At Stager we use a slightly modified/specialized version of OneFlow by Adam Ruka.

OneFlow’s basic premise is to have one eternal branch in your repository, master, which should be in sync with what's currently running in production. All other branches are meant to be short-lived, and their main purpose is to facilitate code sharing and backup. Every new (production) release is based on the previous release.

Besides the master branch we have:

@cies
cies / exceptions.md
Last active Nov 8, 2019
Exceptions in general and in Java/Kotlin/TS in particular
View exceptions.md

Exceptions in general and in Java in particular

The use of exceptions for anything but unrecoverable errors is greatly contested in programming. In this article we try to shed some light on this matter. But before we start digging deeper, here some considerations:

  • Unrecoverable is not very well defined. Sometimes it makes sense for software to crash: print some final log lines, try to do some cleanups and abort. Sometimes it does not: when we are in some code that simply needs to fail hard at that particular task/job/request (and surely log the "bug hinting error") but remain in service. Unrecoverable could also mean: cannot continue without a retry.

  • There is a common phrase "exceptions should be used for exceptional conditions; things you don't expect to happen" which does not add much to the discussion. What is truly exceptional is about as vague as truly unrecoverable.

  • Some languages, notably Java (but not Kotlin!), allow for "checked" exceptions. In Java these checked exceptions (inheriting fr

@cies
cies / exceptions.md
Created Nov 7, 2019
xceptions in general and in Java/Kotlin/TS in particular
View exceptions.md

Exceptions in general and in Java in particular

The use of exceptions for anything but unrecoverable errors is greatly contested in programming. In this article we try to shed some light on this matter. But before we start digging deeper, here some considerations:

  • Unrecoverable is not very well defined. Sometimes it makes sense for software to crash: print some final log lines, try to do some cleanups and abort. Sometimes it does not: when we are in some code that simply needs to fail hard at that particular task/job/request (and surely log the "bug hinting error") but remain in service. Unrecoverable could also mean: cannot continue without a retry.

  • There is a common phrase "exceptions should be used for exceptional conditions; things you don't expect to happen" which does not add much to the discussion. What is truly exceptional is about as vague as truly unrecoverable.

  • Some languages, notably Java (but not Kotlin!), allow for "checked" exceptions. In Java these checked exceptions (inheriting fr

View userChrome.css
/* On Linux this file should be in:
~/.mozilla/firefox/$USER_ID.default/chrome/userChrome.css
To be used with the awesome Tree Style Tabs addon.
*/
/* Hide horizontal tabs at the top of the window */
@-moz-document url("chrome://browser/content/browser.xul") {
#TabsToolbar {
visibility: collapse !important;
@cies
cies / belasting_app_op_ubuntu.md
Created Jun 14, 2018
Het installeren van de Belastingdienst applicatie(s) op een recente (2018) Ubuntu versie
View belasting_app_op_ubuntu.md

Deze gist om mijn ervaring/oplossing te delen met het installeren van de Belastingdienst applicatie la2018ux op een recente Ubuntu. Wellicht dat dit ook werkt op Debian, geen idee.

Allereerst: samen on de Belastingdienst dat ze die app(s) alleen in 32-bit leveren, terwijl 64-bit al 10 jaar meer gangbaar is dan 32-bit. Ik raad iedereen aan om hier over te klagen (vraag of ze er een aantekening van maken en het doorgeven), dan gaan ze wellicht ooit voor ons marginaal kleine clubje zorgen! Maar ik verwacht dat ze een web app eerder afhebben, dan een 64-bit build.

Ik heb de .deb gedownload. Er stond iets verkeerd ingesteld waardoor mijn browser de inhoud van de .deb probeerde weer te geven. Ik heb de link gekopieerd en met wget dat ding gedownload.

Toen eerste poging:

sudo dpkg -i la2018_1.10_i386.deb
@cies
cies / SETUP.md
Created Dec 18, 2015
VM setup for Rails workshop
View SETUP.md

Rails Workshop VM

Welcome to this VM! Your username is railsws and your password (in case you need it, like when using sudo) is railsws as well.

Good luck and enjoy!

Pre-installed software (we did this for you)

Here a list of the pre-installed software on this VM.

@cies
cies / rails-workshop-preps.md
Last active Dec 28, 2015
Voorbereidingen voor de MVC web application workshop HRO 2015 @ Hoppinger
View rails-workshop-preps.md

In deze tekst vind je hoe je je kunt voorbereiden op de MVC web applicatie workshop die Hoppinger organiseerd op 11 januari 2016.

De alles-in-een Virtual Machine

Voor de cursus hebben we een Virtual Machine (VM) gemaakt, welke alles bevast om gelijk mee aan de slag te kunnen. Download de VM op de volgende link:

https://www.dropbox.com/s/bc2sqy9t3f6ohe4/rails-workshop-vm.ova?dl=0

View .dir-locals.el
((haskell-mode
. ((haskell-indent-spaces . 2)
(hindent-style . "gibiansky")
(haskell-process-type . stack-ghci)
(haskell-process-path-ghci . "stack")
(haskell-process-args-ghci . ("ghci"))
(haskell-process-args-stack-ghci . ("--ghc-options=-ferror-spans" "--with-ghc=ghci-ng"))))
(haskell-cabal-mode
. ((haskell-process-type . stack-ghci)
(haskell-process-path-ghci . "stack")
@cies
cies / .spacemacs
Created Sep 13, 2015
My .spacemacs when trying to get a full features Haskell setup that is stack-aware
View .spacemacs
;; -*- 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."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()