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
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 { |
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 | |
import subprocess | |
import re | |
class Membase: | |
def __init__(self, agentConfig, checksLogger, rawConfig): | |
self.agentConfig = agentConfig | |
self.checksLogger = checksLogger | |
self.rawConfig = rawConfig |
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 | |
if( FALSE == isset($_SERVER['REDIRECT_URL']) ) { | |
if( FALSE == isset($_SERVER['PATH_INFO']) ) { | |
$_SERVER['REDIRECT_URL'] = $_SERVER['SCRIPT_NAME']; | |
} | |
else { | |
$_SERVER['REDIRECT_URL'] = $_SERVER['PATH_INFO']; | |
} | |
} |
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
/** | |
* License: WTFPL - http://sam.zoy.org/wtfpl/ | |
* Copyright: (c) 2012 Derp Ltd. <openrating@derp.ltd.uk> | |
* Version: 0.1 | |
* Authors: Harry Roberts | |
*/ | |
module openrating; | |
import std.stdio; | |
import std.datetime; |
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 | |
class DB extends PDO { | |
function __construct($dsn, $user = NULL, $password = NULL) { | |
$params = array( | |
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'', | |
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE, | |
PDO::ATTR_PERSISTENT => TRUE, | |
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, | |
PDO::ATTR_ORACLE_NULLS => PDO::NULL_EMPTY_STRING, | |
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC); |
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 "SDL.h" | |
#include "SDL_gfxPrimitives.h" | |
#include "SDL_framerate.h" | |
#include <stdbool.h> | |
#include <math.h> | |
static const int laycnt = 7; | |
static int layalpha[7]; | |
static double lay[7]; |
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 "SDL.h" | |
#include "SDL_gfxPrimitives.h" | |
#include "SDL_framerate.h" | |
#include <stdbool.h> | |
#include <math.h> | |
#include <stdio.h> | |
double derp = 0; |