Skip to content

Instantly share code, notes, and snippets.

View daviddeutsch's full-sized avatar

David Deutsch daviddeutsch

View GitHub Profile
@daviddeutsch
daviddeutsch / Makefile
Last active June 30, 2022 10:33
My backup / new system setup Makefile
SHELL := /bin/bash
.PHONY: backup-daily backup-weekly
uname = $(shell whoami)
# Two storage mediums I keep on daily/weekly rotation
# just put in your own device UUID
dailyMediaUuid = UUID1
weeklyMediaUuid = UUID2
You can wake up one who is sleeping, but not one who is pretending to be asleep.
Du kannst jemanden aufwecken der schläft, nicht aber den der nur vorgibt zu schlafen.
/**
* Plugin for linking multiple owl instances
* @version 1.0.0
* @author David Deutsch
* @license The MIT License (MIT)
*/
;(function($, window, document, undefined) {
/**
* Creates the Linked plugin.
@daviddeutsch
daviddeutsch / plan.md
Last active December 21, 2015 22:29
Cleanup of RCM codebase

Cleanup of RCM codebase

I already outlined this in my post to the mailing list, but to recap - In general, the process will be three-passed per pull request.

  1. Basic formatting to get to PSR-2 compliance (largely automatic)
  2. In-depth stuff like proper PHPdoc blocks (partly automatic)
  3. Hunting for bugs or clearing up structures that could be unclear

So the idea with that is that I could roll back to a less controversial commit within a PR and we could already commit that while discussing the stuff that didn't turn out as acceptable.

@daviddeutsch
daviddeutsch / rcube_vcard.php
Created August 20, 2013 18:43
/program/lib/Roundcube/rcube_vcard.php
<?php
/*
+-----------------------------------------------------------------------+
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2008-2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
| See the README file for a full license statement. |
@daviddeutsch
daviddeutsch / rcube_install.php
Created August 20, 2013 18:28
/installer/rcube_install.php
<?php
/*
+-----------------------------------------------------------------------+
| rcube_install.php |
| |
| This file is part of the Roundcube Webmail package |
| Copyright (C) 2008-2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
@daviddeutsch
daviddeutsch / archive.php
Created August 20, 2013 18:09
/plugins/archive/archive.php
<?php
/**
* Archive
*
* Plugin that adds a new button to the mailbox toolbar
* to move messages to a (user selectable) archive folder.
*
* @version 2.0
* @license GNU GPLv3+
@daviddeutsch
daviddeutsch / MySQL.php
Last active December 20, 2015 14:29
widenColumn
<?php
// MySQL::widenColumn
// Original Function
public function widenColumn($type, $column, $datatype) {
$table = $type;
$type = $datatype;
$table = $this->esc($table);
$column = $this->esc($column);
$newtype = array_key_exists($type, $this->typeno_sqltype) ? $this->typeno_sqltype[$type] : '';
@daviddeutsch
daviddeutsch / Finder.php
Last active December 20, 2015 14:29
Cleanup Ex 1
<?php
// Original function
public function find($type, $sql = null, $bindings = array()) {
if ($sql instanceof RedBean_SQLHelper) list($sql, $bindings) = $sql->getQuery();
if (!is_array($bindings)) throw new RedBean_Exception_Security('Expected array, ' . gettype($bindings) . ' given.');
return $this->redbean->find($type, array(), $sql, $bindings);
}
// Split open Ifs, add whitespace, newlines
public function find( $type, $sql = null, $bindings = array() )