Skip to content

Instantly share code, notes, and snippets.

View tbreuss's full-sized avatar
🚴‍♂️
Biking

tebe tbreuss

🚴‍♂️
Biking
View GitHub Profile
@tbreuss
tbreuss / jquery-simple-widget.js
Last active January 30, 2021 07:55
jQuery Tips & Tricks
/*!
* 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 July 5, 2017 15:51 — forked from victorbstan/php_object_to_array.php
recursively cast a PHP object to array
<?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 June 30, 2017 09:00 — forked from shameerc/Application.php
Simple plugin system using Reflection api
<?php
/**
* Application class
*
* @author Shameer
*/
class Application {
private $plugins = array();
public function __construct() {
// Constructor
@tbreuss
tbreuss / zabbix-installation.md
Last active May 25, 2017 07:00
Zabbix Installations-Anleitung

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 June 17, 2017 07:10 — forked from natelandau/.bash_profile
Mac OSX 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 December 21, 2023 20:29
IP Blacklist Check Script - This is a simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once.
<?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"/>
@tbreuss
tbreuss / markdown.css
Created May 23, 2016 08:13
Default styling for Markdown files.
body{
margin: 0 auto;
font-family: Georgia, Palatino, serif;
color: #444444;
line-height: 1;
max-width: 960px;
padding: 30px;
}
h1, h2, h3, h4 {
color: #111111;
@tbreuss
tbreuss / regex-multiline-colon-separated-key-value-pairs.php
Last active April 5, 2016 13:07
Regex to capture colon-separated key-value pairs, with multi-line values
<?php
$contents = "
@title: Tests / Variablen
@menu: Variablen
@layout: default.html
@format: md
@twig: 1
@date: 1388102400
@keep_extension: 0
@tbreuss
tbreuss / linux-kommandos.md
Last active March 24, 2016 16:46
LINUX - Kommandos

LINUX - Kommandos

Befehl Beschreibung Art
at Ausführen eines Programms Scheduler
atq Anzeigen der einmalig geplanten Programmen Scheduler
atrm Löschen eines einmalig geplanten Programms Scheduler
batch Ausführen eines Programms bei niedriger Systemlast Scheduler
cal Kalender anzeigen
cat Verknüpfung von Dateien ("concatenate") Allgemein
@tbreuss
tbreuss / procEnableKeysOnAllTables.sql
Last active February 23, 2016 10:44
This is a stored procedure that loops through all tables of a database and enables indexes
DELIMITER $$
DROP PROCEDURE IF EXISTS procEnableKeysOnAllTables $$
CREATE PROCEDURE procEnableKeysOnAllTables()
BEGIN
DECLARE table_name VARCHAR(255);
DECLARE end_of_tables INT DEFAULT 0;