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
# This file should be in /etc/monit/conf.d | |
check process hhvm with pidfile /var/run/hhvm/pid | |
group hhvm | |
# Start program calls our custom script from above | |
start program = "/usr/local/sbin/start_hhvm.sh" | |
stop program = "/usr/sbin/service hhvm stop" | |
if failed unixsocket /var/run/hhvm/hhvm.sock then restart | |
if mem > 400.0 MB for 1 cycles then restart | |
if 5 restarts with 5 cycles then timeout |
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
# | |
set $skip_cache 0; | |
# POST requests and URL with a query string should always go to php | |
if ($request_method = POST) { | |
set $skip_cache 1; | |
} | |
if ($query_string != "") { |
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 | |
# I was in a hurry for a SYS server so i make this quick script, | |
# notice that you have to use codes from the "us" version, since server's id | |
# are different in the Europe versions of ovh sites | |
# You'll receive notification mails like this: | |
# | |
# 141cabk1 | BK-8T: Intel i3 2130 2c/4t 3.4 GHz+ 8 GB 2x4 TB SATA | |
# AVAILABLE (1H-low) in gra | |
# AVAILABLE (1H-low) in sbg |
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 | |
/* | |
* Script to check SoYouStart availability based on http://www.tienle.com/2014/09-03/script-check-soyoustart-availability.html | |
* to help see http://www.richzendy.org/2014/10/05/script-php-para-chequear-y-notificar-disponibilidad-de-servidores-en-soyoustart.html | |
*/ | |
define('CHECK_URL', 'http://ws.ovh.com/dedicated/r2/ws.dispatcher/getAvailability2'); | |
define('NOTIFICATION_EMAILS', 'YOUR_EMAIL@DOMAIN.COM'); | |
define('SYSTEM_EMAIL', '1'); // 1 = enabled local smtp system | |
define('MANDRILL', '0'); // 1 = enable email trought mandrill api, require an account on https://mandrillapp.com/ |
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
####################################################### | |
### nginx compact ojs configuration start | |
####################################################### | |
location ~ /\.ht { | |
deny all; | |
} | |
location ~ ^/cache(.*)$ { | |
deny all; |
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 bash | |
# Tobias Schifftner, @tschiffnter | |
# | |
# Usage: | |
# bash fail2ban-cleanup.php <fail2ban.sqlite3> | |
FILE=${1:-"/var/lib/fail2ban/fail2ban.sqlite3"} | |
[ -f "$FILE" ] || { echo "$FILE not found"; exit 1; } |
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
#!/bin/bash | |
# Bash Script by https://gist.github.com/mitchellkrogza | |
# ************************************************************ | |
# This script clears the log file and database of Fail2Ban | |
# This resets Fail2Ban to a completely clean state | |
# Useful to use after you have finished testing all your jails | |
# and completed your initial setup of Fail2Ban and are now | |
# putting the server into LIVE mode | |
# ************************************************************ |
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 python3 | |
# -*- coding: UTF-8 -*- | |
import socket | |
import json | |
server_address = '/tmp/example.sock' | |
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) | |
sock.connect(server_address) |
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
const EventEmitter = require('events') | |
class MyClass extends EventEmitter { | |
constructor() { | |
super() // required | |
this.emit('event', 100) | |
} | |
} |
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
/* | |
* node-ws - pure Javascript WebSockets server | |
* Copyright Bradley Wright <brad@intranation.com> | |
*/ | |
// Use strict compilation rules - we're not animals | |
'use strict'; | |
var net = require('net'), | |
crypto = require('crypto'); |
OlderNewer