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
import docutils.core | |
def render_body_rst(body): | |
parts = docutils.core.publish_parts( | |
body, | |
settings_overrides=dict(initial_header_level=2), | |
) | |
return parts['body'] |
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
# sent this to test 404 handling. Note the incorrect pathname | |
# curl -i -d @testdata -H "X-GitHub-Event: issues" http://localhost:8000/githu | |
# The FIRST time a request is made, nothing is wrong. The SECOND time it may or may not error. | |
# First Error | |
_stream_writable.js:322 | |
function onwrite(stream, er) { | |
^ | |
RangeError: Maximum call stack size exceeded |
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
[Unit] | |
Description=HookBot | |
[Service] | |
ExecStart=/home/tritium/HookBot/server.js | |
Restart=always | |
Environment=PATH=/usr/bin:/usr/local/bin | |
Environment=NODE_ENV=production | |
WorkingDirectory=/home/tritium/HookBot |
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 dns = require('dns'); | |
const events = require('events'); | |
const http = require('http'); | |
const util = require('util'); | |
const ip = require('ip'); | |
// Try REALLY hard to get a publicly accessable IP | |
function MyIP(addr) { |
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
Alex@LUXOR C:\Users\Alex\Source\Repos\pydiceparse | |
> python diceparse.py 5a4 | |
You rolled [5a4: [3, 5, 2, 2, 1] vs. [2, 3, 6, 4]] 0 Hits -- Failure | |
Alex@LUXOR C:\Users\Alex\Source\Repos\pydiceparse | |
> python diceparse.py 5a4 | |
You rolled [5a4: [4, 5, 2, 6, 2] vs. [4, 2, 6, 4]] 1 Hits -- Success | |
Alex@LUXOR C:\Users\Alex\Source\Repos\pydiceparse | |
> python diceparse.py 5a4 |
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
/* | |
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. | |
For licensing, see LICENSE.md or http://ckeditor.com/license | |
*/ | |
.cke_reset{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none}.cke_reset_all,.cke_reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;width:auto;height:auto;vertical-align:baseline;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;position:static;-webkit-transition:none;-moz-transition:none;-ms-transition:none;transition:none;border-collapse:collapse;font:normal normal normal 12px Arial,Helvetica,Tahoma,Verdana,Sans-Serif;color:#000;text-align:left;white-space:nowrap;cursor:auto;float:none}.cke_reset_all .cke_rtl *{text-align:right}.cke_reset_all iframe{vertical-a |
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
total 1900 | |
drwxrwxr-x 5 tritium nginx 4096 Nov 29 23:01 ./ | |
drwxr-xr-x 4 root root 4096 Sep 3 09:28 ../ | |
drwxrwxr-x 2 tritium tritium 4096 Oct 30 00:09 attach/ | |
drwxrwxr-x 2 tritium tritium 4096 Nov 29 23:27 files/ | |
-rw-r--r-- 1 tritium nginx 46631 Nov 29 22:48 files0f36193acb7175edd0147499dd46f966 | |
-rw-r--r-- 1 tritium nginx 2232 Nov 5 14:12 files116b36c44ade2e1b7b5df0af8b9001e1 | |
-rw-r--r-- 1 tritium nginx 1667 Nov 5 13:27 files1a2d0eeafa4dc51745b57f4c7a8d5c73 | |
-rw-r--r-- 1 tritium nginx 3617 Nov 5 02:00 files471fa19299db06045d5b0539d194b981 | |
-rw-r--r-- 1 tritium nginx 1323 Nov 5 14:13 files4895c3726f5b35aabcd54efc0e85bee3 |
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
@app.route('/fetch/<path:location>') | |
def fetch(location): | |
# USE REWRITING! | |
url = "{0}{1}".format(REDACTED, location) | |
headers = { | |
"user-agent": ( | |
"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) " | |
"Gecko/20100101 Firefox/46.0" | |
), | |
} |
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
# Run with python py_for_pi_day.py [number of rounds] [upper limit on random number] | |
# Python 3.5+ | |
import math | |
import random | |
import sys | |
def main(rounds, limit): | |
print(rounds, "Rounds") | |
print(limit, "Sides") |
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
; <<>> DiG 9.10.3-P4-Ubuntu <<>> NS blogofthedead.org @a0.org.afilias-nst.info | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2768 | |
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 6 | |
;; WARNING: recursion requested but not available | |
;; OPT PSEUDOSECTION: | |
; EDNS: version: 0, flags:; udp: 4096 |