Skip to content

Instantly share code, notes, and snippets.

Avatar
🚴‍♂️
Biking

tebe tbreuss

🚴‍♂️
Biking
View GitHub Profile
@tbreuss
tbreuss / pdo-fetch-class-example.md
Last active Jan 30, 2021
Simple example using PDO with FETCH_CLASS implementing a modest Entity pattern.
View pdo-fetch-class-example.md
<?php
declare(strict_types=1);

require dirname(__DIR__) . '/../vendor/autoload.php';

class Entity
{
    public function __construct(array $data)
    {
@tbreuss
tbreuss / docker-enc2ly.md
Last active Jan 1, 2021
Converting Encore files to LilyPond using Docker
View docker-enc2ly.md

This is a solution to run the original enc2ly CLI program within a Docker container.

There are two CLI programs that convert Encore musical files to LilyPond.

Unfortunately I wasn't able to run these programs on my MacOS.

So, here are the instructions for using the original enc2ly CLI programm within a Docker container.

@tbreuss
tbreuss / readme.md
Created Aug 3, 2018
README.md Template
View readme.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tbreuss
tbreuss / TextareaUpload.vue
Last active Dec 31, 2017 — forked from stevebauman/TextareaUpload.vue
Markdown Text Area Upload VueJS 2 Component
View TextareaUpload.vue
<template>
<textarea
:id="id"
:name="name"
:value="value"
:placeholder="placeholder"
:rows="rows"
:cols="cols"
class="form-control"
@dragover.prevent
@tbreuss
tbreuss / jquery-simple-widget.js
Last active Jan 30, 2021
jQuery Tips & Tricks
View jquery-simple-widget.js
/*!
* jQuery simpleWidget - v0.1pre - 10/28/2010
* http://benalman.com/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($,undefined){
@tbreuss
tbreuss / php_object_to_array.php
Created Jul 5, 2017 — forked from victorbstan/php_object_to_array.php
recursively cast a PHP object to array
View php_object_to_array.php
<?php
/*
This function saved my life.
found on: http://www.sitepoint.com/forums//showthread.php?t=438748
by: crvandyke
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?!
*/
$array = json_decode(json_encode($object), true);
@tbreuss
tbreuss / Application.php
Created Jun 30, 2017 — forked from shameerc/Application.php
Simple plugin system using Reflection api
View Application.php
<?php
/**
* Application class
*
* @author Shameer
*/
class Application {
private $plugins = array();
public function __construct() {
// Constructor
@tbreuss
tbreuss / zabbix-installation.md
Last active May 25, 2017
Zabbix Installations-Anleitung
View zabbix-installation.md

Zabbix Installationsanleitung

Diese Anleitung orientiert sich im wesentlichen an http://c64-online.com/?page_id=4707. Sie unterscheidet sich aber in der eingesetzten Zabbix Version (LTS-Version 3.0.8) und der Server Infrastruktur (Raspberry Pi 3).

Zabbix Server installieren

Das Raspbian Betriebssystem aktualisieren:

@tbreuss
tbreuss / .bash_profile
Last active Jun 17, 2017 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@tbreuss
tbreuss / dnsbl.php
Last active Feb 26, 2021
IP Blacklist Check Script - This is a simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once.
View dnsbl.php
<?php // Simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once. ?>
<html>
<head>
<title>DNSBL Lookup Tool - IP Blacklist Check Script</title>
</head>
<body>
<h2>IP Blacklist Check Script</h2>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post">
<input type="text" value="" name="ip"/>
<input type="submit" value="LOOKUP"/>