Skip to content

Instantly share code, notes, and snippets.

View ElectricCoffee's full-sized avatar

Niko Lepka ElectricCoffee

View GitHub Profile
@ElectricCoffee
ElectricCoffee / RichPath.scala
Last active August 29, 2015 14:03
A simple bit of extension methods that lets you write "someFolder" / "otherFolder" / "LastFolder" to create a java.io.File with that kind of path. An important feature of this, is that it's completely OS agnostic, meaning you don't have to worry about it being \ in Windows and / in Unix-based OSs, you just write it, and it handles the rest from …
import java.io.File
/**
* A completely OS-Agnostic way of dealing with java.io.File paths
*/
object RichPath {
sealed class RichBase[+A](left: A) {
/**
* Simple enrichment method designed to let you create a java.io.File
* by simply writing "folderA" / "folderB" / "folderC"
@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@mtornwall
mtornwall / gist:4555164
Created January 17, 2013 10:45
Gets rid of Erlang electric arrows in Emacs. Finally I can write cases and function clauses in one line without screaming in frustration.
;; Disable the electric arrow, but keep comma and semicolon
(setq-default erlang-electric-commands
'(erlang-electric-comma
erlang-electric-semicolon))