Skip to content

Instantly share code, notes, and snippets.

View jaysonsperling's full-sized avatar

Jayson Sperling jaysonsperling

View GitHub Profile
@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
[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
##############################
# 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,
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
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
[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
[sperling@s87584 ~]$ curl -v http://sweepy.pw
* About to connect() to sweepy.pw port 80 (#0)
* Trying 104.236.214.145...
* Connected to sweepy.pw (104.236.214.145) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: sweepy.pw
> Accept: */*
>
* Connection #0 to host sweepy.pw left intact
[sperling@s87584 ~]$ curl -v https://sweepy.pw
* About to connect() to sweepy.pw port 443 (#0)
* Trying 104.236.214.145...
* Connected to sweepy.pw (104.236.214.145) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* Server certificate:
* subject: CN=sweepy.pw,OU=PositiveSSL,OU=Domain Control Validated
* start date: Apr 02 00:00:00 2016 GMT

Keybase proof

I hereby claim:

  • I am jaysonsperling on github.
  • I am jaysonsperling (https://keybase.io/jaysonsperling) on keybase.
  • I have a public key ASDgKvQPH_vCyCK1M_2eRtQRz4iXplUBbgbVVSrfsZlWewo

To claim this, I am signing this object:

[root@chef0021p1mdw1 log]# tcpdump -n -i any host 10.133.18.179 and not port 22
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
02:21:54.134856 IP 10.133.18.179.45140 > 10.42.248.186.https: Flags [S], seq 1777180591, win 29200, options [mss 1460,sackOK,TS val 234064729 ecr 0,nop,wscale 9], length 0
02:21:54.134856 IP 10.133.18.179.45140 > 10.42.248.186.https: Flags [S], seq 1777180591, win 29200, options [mss 1460,sackOK,TS val 234064729 ecr 0,nop,wscale 9], length 0
02:21:54.134885 IP 10.42.248.186.https > 10.133.18.179.45140: Flags [S.], seq 1573255477, ack 1777180592, win 14480, options [mss 1460,sackOK,TS val 1015751246 ecr 234064729,nop,wscale 7], length 0
02:21:54.134887 IP 10.42.248.186.https > 10.133.18.179.45140: Flags [S.], seq 1573255477, ack 1777180592, win 14480, options [mss 1460,sackOK,TS val 1015751246 ecr 234064729,nop,wscale 7], length 0
02:21:54.257195 IP 10.133.18.179.45140 > 10.42.248