Quick list of monitoring tools
This file contains hidden or 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
angular.module('myApp').directive('addthisToolbox', ['$timeout', function($timeout) { | |
return { | |
restrict : 'A', | |
transclude : true, | |
replace : true, | |
template : '<div ng-transclude></div>', | |
link : function($scope, element, attrs) { | |
$timeout(function () { | |
addthis.init(); | |
addthis.toolbox($(element).get(), {}, { |
This file contains hidden or 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
#!/bin/bash | |
# vim: set sts=4 sw=4 et tw=0 : | |
# | |
# License: BSD | |
AUTOMAGIC_MODE="true" | |
OPACITY_100="0xffffffff" | |
OPACITY_0="0x0" | |
: ${XWININFO:=$(type -P xwininfo)} |
This file contains hidden or 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
#!/bin/bash | |
# Downtimes are third Sunday of the month. In order to plan | |
# for upgrades and reboots, we email ourselves the list of all | |
# outstanding security updates for each system on the 2nd | |
# Wednesday of the month. | |
# Critical security update alerts are sent daily. | |
# Requires yum-plugin-security and mailx. | |
WEEKOFMONTH=$((($(date +%d)-1)/7+1)) | |
DAYOFWEEK=$(date +%u) |
This file contains hidden or 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
#!/bin/bash | |
# Functions ============================================== | |
# return 1 if global command line program installed, else 0 | |
# example | |
# echo "node: $(program_is_installed node)" | |
function program_is_installed { | |
# set to 1 initially | |
local return_=1 |
This file contains hidden or 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
http://pwfisher.com/nucleus/index.php?itemid=45 | |
This command line option parser supports any combination of three types of options (switches, flags and arguments) and returns a simple array. | |
<?php | |
/** | |
* CommandLine class | |
* | |
* @package Framework | |
*/ | |
/** |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
This file contains hidden or 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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
NewerOlder