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
/* | |
* Lazy Load - jQuery plugin for lazy loading images | |
* | |
* Copyright (c) 2007-2009 Mika Tuupola | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
* Project home: | |
* http://www.appelsiini.net/projects/lazyload |
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
#ifndef EASYHS_HPP_ | |
#define EASYHS_HPP_ | |
#pragma once | |
#include <handlersocket/hstcpcli.hpp> | |
#include <QList> | |
#include <QVariant> | |
#include <QRunnable> | |
#include <QObject> | |
#include <QMetaProperty> |
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 python | |
# based on the tahoelafs project | |
# requires modification to pyfilesystem for mknod etc. | |
# but provides enough to extract a minimal linux install | |
# and then chroot into it :) | |
import pymongo | |
import gridfs | |
import os | |
import fs | |
import math |
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
""" | |
The server density API is so easy with a shake of jsonpath :) | |
Example: | |
groups = sdapi.call('servers/listGroups', '$..groups') | |
web_server_ids = sdapi.call('servers/getByGroup', '$..serverId', group='Web') | |
For a jsonpath reference, try: http://code.google.com/p/jsonpath/wiki/Javascript | |
""" |
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
class packages::ruby { | |
package{ | |
['ruby','rubygems','ruby-dev']: | |
ensure => present; | |
} | |
} | |
define rubygem( | |
$version = "" | |
) { |
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
# ----------------- | |
# include mongo-options | |
MONGO_ARCH := i686 | |
MONGO_VERSION := 2.0.0 | |
MONGO_OS := linux | |
MONGO_MD5 := 573d8da35806fa3fc5db3305a644852e | |
# ----------------- | |
MONGO_DIR = mongodb-$(MONGO_OS)-$(MONGO_ARCH)-$(MONGO_VERSION) | |
TARBALL = $(MONGO_DIR).tgz |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <libgen.h> | |
#include <signal.h> | |
#include <err.h> | |
#include <assert.h> | |
#include <zmq.h> |
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
class ProcNetNetstat: | |
def __init__(self, agentConfig, checksLogger, rawConfig): | |
pass | |
def run(self): | |
dat = {} | |
for line in open('/proc/net/netstat','r').readlines(): | |
line = line.split() | |
name = line[0] | |
line.remove(name) |
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 python2.7 | |
import sys | |
import user | |
from serverdensity.api import SDApi, SDServiceError | |
api = SDApi(getattr(user, 'serverdensity_domain'), | |
getattr(user, 'serverdensity_username'), | |
getattr(user, 'serverdensity_password'), | |
getattr(user, 'serverdensity_api_key')) |
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 python | |
class LinuxProcSysFs: | |
def __init__(self, agentConfig, checksLogger, rawConfig): | |
self.agentConfig = agentConfig | |
self.checksLogger = checksLogger | |
self.rawConfig = rawConfig | |
def run(self): | |
x = open('/proc/sys/fs/file-nr', 'r').readline().split() | |
return { |
OlderNewer