This file contains hidden or 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 | |
import binascii | |
import socket | |
import sys | |
from collections import OrderedDict | |
# See https://web.archive.org/web/20180919041301/https://routley.io/tech/2017/12/28/hand-writing-dns-messages.html | |
# See https://tools.ietf.org/html/rfc1035 |
This file contains hidden or 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 | |
function escapetext($text) { | |
return str_replace("\n", "<br>", htmlentities($text)); | |
} | |
function exec_command($cmd, $internal = false) { | |
try { | |
$shell_exec = shell_exec($cmd); | |
} catch (Exception $e) { |
This file contains hidden or 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
/* "<name of block>": [<start of block>, <end of block>] */ | |
{ | |
"Basic Latin": [0x0000, 0x007F], | |
"Latin-1 Supplement": [0x0080, 0x00FF], | |
"Latin Extended-A": [0x0100, 0x017F], | |
"Latin Extended-B": [0x0180, 0x024F], | |
"IPA Extensions": [0x0250, 0x02AF], | |
"Spacing Modifier Letters": [0x02B0, 0x02FF], | |
"Combining Diacritical Marks": [0x0300, 0x036F], | |
"Greek and Coptic": [0x0370, 0x03FF], |
This file contains hidden or 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
class NumberFormatter { | |
constructor() { | |
} | |
toDec(numstr) { | |
return parseInt(numstr, 10).toString(10); | |
} | |
toHex(numstr) { |
This file contains hidden or 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 createElement = (tagname = '') => { | |
return (...content) => { | |
const el = document.createElement(tagname); | |
if (content[0] instanceof Object && !(content[0] instanceof HTMLElement)) { | |
let attributes = content.shift(); | |
for (let attr in attributes) { | |
switch (attr) { | |
case 'events': |
This file contains hidden or 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 bitstringToBigInt = bstr => { | |
let counter = 0n; | |
let byteindex = 0n; | |
for (let i = bstr.length - 1; i >= 0; i--) { | |
if (bstr[i] === '1') { | |
counter += 2n**byteindex; | |
} | |
byteindex++; |
This file contains hidden or 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
/* | |
* Javascript goes here | |
*/ |
This file contains hidden or 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
// The following COMobjects are all callable in cscript with WScript.CreateObject(COMObject) | |
ADODB.Command is callable! | |
ADODB.Command.6.0 is callable! | |
ADODB.Connection is callable! | |
ADODB.Connection.6.0 is callable! | |
ADODB.Error is callable! | |
ADODB.Error.6.0 is callable! | |
ADODB.Parameter is callable! | |
ADODB.Parameter.6.0 is callable! | |
ADODB.Record is callable! |
This file contains hidden or 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 | |
class T5KParser { | |
private $primelistURL = 'https://t5k.org/primes/lists/all.txt'; | |
private $primelistRaw; | |
public $primes = []; | |
public $proofcodes = []; | |
public function parse() { |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
NewerOlder