Skip to content

Instantly share code, notes, and snippets.

View topnotcher's full-sized avatar

Greg Bowser topnotcher

  • Zebra Technologies
  • Lincoln, RI
View GitHub Profile
if ($rps{$u}{level} >= 25 && rand(40) < 1) {
$ulevel = 50+int(rand(25));
if ($ulevel >= $level && $ulevel > int($rps{$u}{item}{helm})) {
notice("The light of the gods shines down upon you! You have ".
"found the level $ulevel Mattt's Omniscience Grand Crown! ".
"Your enemies fall before you as you anticipate their ".
"every move.",$rps{$u}{nick});
$rps{$u}{item}{helm} = $ulevel."a";
return;
}
---
:nick: derp
:channel: '#derp'
:host: irc.consental.com
:question_time_limit: 60
:question_warn_times:
- 45
- 30
- 15
:plugins:
USB_Device_Config_Descriptor device_configuration = {
.config = {
.bLength = sizeof(USB_StdDescriptor_Configuration_Header_t),
.bDescriptorType = DESC_CONFIGURATION,
.wTotalLength = sizeof(USB_Device_Config_Descriptor),
.bNumInterfaces = 2,
.bConfigurationValue = 1,
.iConfiguration = 0, /*unused*/
.bmAttributes = 0x80, /*bus power, no wakeup*/
.bMaxPower = 0x32, /*100mA*/
package syslog;
import java.net.DatagramSocket;
import java.net.DatagramPacket;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
#!/usr/bin/python2
import sys
import os
import urllib
import urllib.error
import urllib.request
import json
import string
import hashlib
import math
\documentclass{hw}
\setlength{\parindent}{0pt}
\setlength{\parskip}{8pt}
%\usepackage[margin=.5in, paperwidth=8.5in, paperheight=11in]{geometry}
\usepackage{multicol}
\usepackage{mdwlist}
#!/usr/bin/env /usr/local/bin/python2.7
import urllib2
import urllib
import base64
import json
import argparse
parser = argparse.ArgumentParser(description='Push a notification to all of your Pushbullet devices')
parser.add_argument('-k', '--key', type=str, required=True, help="The API Key for your pushbullet account")
parser.add_argument('-t', '--title', type=str, required=True, help="The title of the notification")
def ip2n(ip):
"""
Convert an IP address in dotted quad to an integer
"""
octets = ip.split('.')
return sum([(int(octets[x]))<<(24-(8*x)) for x in range(0,4)])
def n2ip(n):
"""
Convert an integer to a dotted quad ip address
#!/usr/bin/env python2
import RPi.GPIO as gpio
import time, threading
from flask import Flask, render_template, request
LIGHT_GPIO = 2
CRITICAL_TIMEOUT = 1800
app = Flask(__name__)
Name: suricata
Version: 2.0
Release: 1%{?dist}
Summary: Suricata is a high performance Network IDS, IPS and Network Security Monitoring engine
Group: System Environment/Daemons
License: GPLv2
URL: http://suricata-ids.org
Source0: http://www.openinfosecfoundation.org/download/%{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)