This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==Non-optional Coding Guidelines (TBD)== | |
* Newly added or modified methods are no longer than 20 lines. | |
* Any new methods are non-static. Unless everybody agrees this really poses an exception. | |
* A method has 10 params max. If it gets more, it needs refactoring. | |
* No params are provided via arrays to a method (behavior should be the same no matter if an array has 1 or 1M elements). | |
* A method does one thing, and one thing only. | |
* The 'else' statement is not used. | |
* We don't duplicate code, any code. | |
* Any method interacts with a maximum of 7 other objects. | |
* All objects are instantiated using the DI container. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# | |
# Version 0.0.2 - Jan/2009 | |
# Changes: df -P (to avoid it from breaking long lines) | |
# | |
# by Thiago Varela - thiago@iplenix.com | |
# Ripped from: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_disk--2D-%25-used-space/details | |
function help { | |
echo -e "\n\tThis plugin shows the % of used space of a mounted partition, using the 'df' utility\n\n\t$0:\n\t\t-c <integer>\tIf the % of used space is above <integer>, returns CRITICAL state\n\t\t-w <integer>\tIf the % of used space is below CRITICAL and above <integer>, returns WARNING state\n\t\t-d <device>\tThe partition or mountpoint to be checked. eg. "/dev/sda1", "/home", "/"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php5 | |
<?php | |
// select value from /.*/ | |
// delete from /.*/ | |
const PERFDATA_DIR = '/var/spool/icinga2/perfdata/'; | |
$dir = new DirectoryIterator(PERFDATA_DIR); | |
justKeepOnGoing: | |
foreach ($dir as $fileinfo) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 914fcc081a1586bad49abe5200fe32ad8e1f7468 Mon Sep 17 00:00:00 2001 | |
From: "Dolf Schimmel (Freeaqingme)" <dolf@dolfschimmel.nl> | |
Date: Sun, 17 May 2015 02:47:19 +0200 | |
Subject: [PATCH] PDU2-MIB/Raritan (D)PX2 - Outlets, Inlets and State sensors | |
for Over Current Protectors | |
--- | |
includes/definitions/os.inc.php | 1 + | |
includes/definitions/sensors.inc.php | 4 + | |
includes/discovery/sensors/pdu2-mib.inc.php | 111 + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dolf@dolf-ThinkPad-T520:~/Projects/Pacman/library/ZendFramework/tests$ ./runtests.sh Zend/Loader/LoaderTest.php | |
++ phpunit --verbose --group Zend/Loader/LoaderTest.php | |
PHP Fatal error: Cannot redeclare class ZendTest\Cloud\Infrastructure\Adapter\Skip in /home/dolf/Projects/Pacman/library/ZendFramework/tests/Zend/Cloud/Infrastructure/Adapter/RackspaceOnlineTest.php on line 261 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<root> | |
<div> | |
<p> | |
<p>A</p> | |
<p>B</p> | |
<p>C</p> | |
</p> | |
</div> | |
<div> | |
<p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Determne the media type and format to serve based on the accept headers | |
* | |
* How this class works: | |
* It first determines which mediatypes that are part of the accept header can be | |
* possibly used based on their formats. In a later stage one can pick | |
* a specific mediatype using the method match(). This method is meant to select | |
* the most specific entry that still matches the requested media type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Does not work | |
define(["dojo/query"], function($){ | |
$("td").on("click", function(event) { | |
console.log(event); | |
}); | |
}); | |
// Works | |
dojo.query("td").forEach(function(node) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.4.11 (GNU/Linux) | |
mQENBE/R6SkBCADPn7z8yFESArSkJVD7flHP0//915WmNclYRyPUGu5MI665Gs9E | |
KcJ/pn7rirsq2CrArIZNdTLFOoAcT8R68qqiSQAt2U3MYb7np7fwC/wuAuHMOqi6 | |
Q/1wgcpTfQ8KPGuocNN3NnH66QsiCwUanFsjkHVOQTgtfodmP64e9RRx4bwFJOqA | |
H+9j9ha9XJNbwVnT89OgRwUbIpWA8Mlg7DV2Jf6KOtvn+xTungmO7WZLFIEaWXbz | |
6kte8hw4cynctTBGllokPF/Eq0H37C0qf+rTTII93eZCvArLeWmMCjlI/jymGDpf | |
+obbCOJfy2XeobPmNLo8Zrm4x4Ulxb4RM1OrABEBAAG0H0RvbGYgU2NoaW1tZWwg | |
PGRvbGZAZW5yaXNlLmNvbT6JATgEEwECACIFAk/R6SkCGwMGCwkIBwMCBhUIAgkK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Input: | |
application/vnd.foobar+html;q=1; version="2\3\""; level="foo, bar", text/json;level=1, text/xml;level=2;q=0.4 | |
Goal: Explode string by the comma's it contains | |
Contraints: | |
* commas between quotes (") dont count | |
* quotes may be escaped | |
Expected output: | |
* application/vnd.foobar+html;q=1; version="2\3\""; level="foo, bar" |
OlderNewer