Skip to content

Instantly share code, notes, and snippets.

View jaysonsperling's full-sized avatar

Jayson Sperling jaysonsperling

View GitHub Profile
[jaysonsperling@Jayson-Sperling ~ ]$ curl -v http://sweepy.pw
* Rebuilt URL to: http://sweepy.pw/
* Trying 104.236.214.145...
* Connected to sweepy.pw (104.236.214.145) port 80 (#0)
> GET / HTTP/1.1
> Host: sweepy.pw
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
require 'json'
require 'date'
begin
json = JSON.parse(File.read(ARGV[0]))
json_timestamp = json['timestamp'].to_s
decoded_timestamp = DateTime.strptime(json_timestamp, '%s')
if decoded_timestamp < (Date.today - 6)
puts decoded_timestamp
else
frontend site_http <ip>:80
mode http
option forwardfor
option http-server-close
reqadd X-Forwarded-Proto:\ http
default_backend site
frontend site_https
bind <ip>:443 ssl crt /etc/ssl/private/wildcard.site.net.pem
mode http
##############################
# my check for process crond #
##############################
{
"checks": {
"process_cron": {
"command": "/etc/sensu/plugins/check-process.rb -p crond",
"wiki": "http://wiki.something/for/check/failure",
"interval": 30,
[18:51:37 INFO]: JaysonBond issued server command: /gamemode 3
[18:51:37 ERROR]: Could not pass event PlayerCommandPreprocessEvent to CommandHelper v3.3.1-SNAPSHOT:2747-ed69d50,master
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-under_rpg-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-under_rpg-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-under_rpg-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-under_rpg-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1154) [spigot-under_rpg-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection
@jaysonsperling
jaysonsperling / gist:7147821
Last active December 26, 2015 11:59
sam healthcheck (good/bad/deploy)
EXAMPLE OF A GOOD RETURN VALUE
{
status: true,
code: 200,
data: {
database: true,
zendesk_alive: true,
zendesk_comment: true,
zendesk_tag: true,
zendesk_solved: true