Skip to content

Instantly share code, notes, and snippets.

View manzke's full-sized avatar

Daniel Manzke manzke

View GitHub Profile
@artero
artero / launch_sublime_from_terminal.markdown
Last active September 12, 2024 02:13 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@manzke
manzke / GuicyfiedLiterals.java
Last active December 23, 2015 18:39
If you are often using TypeLiterals to describe your bindings of your generic classes, I find them quite ugly and the reference is to hard. That's why I have searched for a possibility to get a layer on top of it.
package de.devsurf.echo.frameworks.rs.service.startup.guice;
import java.lang.reflect.Type;
import com.google.inject.util.Types;
import de.devsurf.common.lang.build.Builder;
import de.devsurf.echo.frameworks.rs.system.api.TypeLiteralBuilder;
import de.devsurf.echo.frameworks.rs.system.api.TypeLiteralBuilder.RawTypeLiteralBuilder;
@manzke
manzke / Templating.java
Last active December 24, 2015 20:19
A class to format message which contain named parameters like "send an email from {sender} to {recipient}".
package de.devsurf.echo.sync.utils;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.google.common.base.Preconditions;
/**