Skip to content

Instantly share code, notes, and snippets.

@nicohofmann
nicohofmann / Preferences.sublime-settings
Last active August 29, 2015 13:56
Sublime Settings
{
"caret_style": "smooth",
"color_scheme": "Packages/Phix Color Scheme/Phix Dark.tmTheme",
"fold_buttons": true,
"font_size": 12,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
#! /usr/bin/env bash
PS1="\[\033[01;36m\]\u\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
EDITOR="/usr/bin/vim"
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
alias grep="grep --color"
@nicohofmann
nicohofmann / lotus_smtp.php
Created September 24, 2012 15:55
lotus_smtp.php
<?php
class lotus_smtp extends rcube_plugin
{
public $task = 'mail|settings';
public function init()
{
$this->add_hook('smtp_connect', array($this, 'lotus_smtp_overwrite'));
}
@nicohofmann
nicohofmann / CityTable.php
Created September 12, 2012 20:10
class City extends AbstractTableGateway
public function searchByName ($str)
{
$like = function (\Zend\Db\Sql\Where $where) use ($str)
{
$where->like('name', $str . '%');
};
$resultSet = $this->select(function (\Zend\Db\Sql\Select $select) use ($like)
{
$select->where(
@nicohofmann
nicohofmann / gist:1461804
Created December 11, 2011 17:57 — forked from caillou/gist:1446583
Translation for relativeDate of moment.js
/*jslint white: false */
var langs;
langs = {
"de" : {
today: "heute um %time",
tomorrow: 'morgen um %time',
next: '%weekday um %time',
yesterday: 'gestern um %time',