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 | |
# mongod - Startup script for mongod | |
# chkconfig: 35 85 15 | |
# description: Mongo is a scalable, document-oriented database. | |
# processname: mongod | |
# config: /usr/local/etc/mongod.conf | |
# pidfile: /var/run/mongo/mongod.pid |
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
use strict; | |
use warnings; | |
use HTTP::daemon; | |
use HTTP::Status; | |
use HTTP::Response; | |
my $d = HTTP::Daemon->new( | |
LocalAddr => '127.0.0.1', | |
LocalPort => '10080', |
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
h = { "old" => 1 } | |
h["new"] = h.delete("old") |
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
# vim: set expandtab ts=4 sw=4 nowrap ft=perl ff=unix : |
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
# parson.as_document => Moped::BSON::Document | |
person = Person.first | |
puts Moped::BSON::Document.serialize(parson.as_document).size |
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/sh | |
# | |
# chkconfig: - 86 14 | |
# description: smokeping init script | |
# processname: smokeping | |
# config: /usr/local/smokeping/etc/smokeping.conf | |
# pidfile: /usr/local/var/smokeping.pid | |
# Source function library. | |
. /etc/rc.d/init.d/functions |
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
# cat /usr/local/smokeping/etc/smokeping.conf | |
*** General *** | |
owner = Your Campany | |
contact = [email protected] | |
mailhost = localhost | |
sendmail = /usr/sbin/sendmail | |
imgcache = /usr/local/smokeping/cache |
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
ScriptAlias /smokeping/smokeping.cgi "/usr/local/smokeping/htdocs/smokeping.cgi" | |
<Directory /usr/local/smokeping/htdocs> | |
AllowOverride None | |
Options ExecCGI | |
Order allow,deny | |
Allow from all | |
</Directory> | |
Alias /smokeping/images /usr/local/smokeping/images | |
Alias /smokeping/cache /usr/local/smokeping/cache | |
Alias /smokeping /usr/local/smokeping/htdocs |
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/sh | |
perl -I/usr/local/smokeping/lib /usr/local/smokeping/bin/smokeping_cgi /usr/local/smokeping/etc/smokeping.conf |
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
# encoding: utf-8 | |
require 'thor' | |
class App < Thor | |
desc 'hello', "Let's say hello!" | |
def hello | |
puts 'Hello world!' | |
end |