Skip to content

Instantly share code, notes, and snippets.

View olofwalker's full-sized avatar
(Always) Working from home


(Always) Working from home
View GitHub Profile
huntc / server.scala
Last active December 12, 2017 04:45
A complete server using Akka streams that reads some source, batches its data and then publishes. If the data cannot be published then it backs off with a best-effort of sending that data again.
View server.scala
val (recycleQueue, recycleSource) =
.queue[SoilStateReading](100, OverflowStrategy.dropTail)
StreamConverters.fromInputStream(() => this.getClass.getClassLoader.getResourceAsStream("sensors.log"))
adham90 / spacemacs-keybindings
Last active December 10, 2023 13:03
spacemacs keybindings that i need to learn
View spacemacs-keybindings
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
wfaler / cake-pattern-example.scala
Created October 22, 2012 16:57
View cake-pattern-example.scala
// simple example of the cake pattern
// abstract DAO trait
trait Repository[A, B]{
// saves an entity, returns an ID
def save(entity: A): B
// more features..
trait RdbmsRepository extends Repository[MyUserCaseClass, Long]{
legumbre /
Created June 29, 2012 00:14
resolving merge conflicts with magit-ediff

Use magit-ediff to resolve merge conflicts

Use magit-ediff or 'e' on an unmerged item to resolve merge conflicts with ediff. Magit will set up an ediff with three buffers A, B and C. A and B are the original (conflicting) files, and C is the conflicted merge.

Use 'n'/'p' to move to the next/previous conflict, use 'a'/'b' to choose which changes (those in a A or B) should be the ones to keep in the merged file.

You can always just switch to buffer C and edit what the merged version should look like.