Skip to content

Instantly share code, notes, and snippets.

View 166MMX's full-sized avatar

Johannes Harth 166MMX

View GitHub Profile
@166MMX
166MMX / main.sh
Created July 9, 2020 21:17
rfc-ref
#!/bn/sh
# https://www.rfc-editor.org/rfc/rfc-ref.txt
perl -n -e 'local $\ = "\n",$,=";";/^(RFC[0-9]+) \|\s+((((, )?(RFC|RTR)[0-9]+)+)|(NIC [0-9]+))?\s+\| (.*), "(.*)"(, (RTR [0-9]+))?(, (FYI [0-9]+))?(, (BCP [0-9]+))?(, (STD [0-9]+))?(, (RFC [0-9]+))?(, (DOI [0-9]+\.[0-9]+\/RFC[0-9]+))?, ((January|February|March|April|May|June|July|August|September|October|November|December)( [0-9]{1,2})? [0-9]{4}), <(https?:\/\/.*)>\./; print $1,$2,$8,$9,$11,$13,$15,$17,$19,$21,$23,$25' rfc-ref.txt >rfc-ref.csv
@166MMX
166MMX / README.md
Created February 19, 2020 14:41 — forked from brandt/README.md
Creates a loopback alias with IP 127.0.0.2 at startup on Mac OS X

Loopback Alias

Creates an alias on the loopback interface (lo0) with the IP 127.0.0.2 on macOS.

Installation

  1. Install the plist to: /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  2. Set mode: sudo chmod 0644 /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  3. Set owner: sudo chown root:wheel /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
  4. Load: sudo launchctl load /Library/LaunchDaemons/com.runlevel1.lo0.127.0.0.2.plist
@166MMX
166MMX / lib.rs
Last active November 13, 2019 21:46
#![allow(unused_variables)]
#![allow(unused_assignments)]
fn main() {}
trait ProgramCounterOperations {
fn consume_instruction(&mut self, m: &VirtualMemory) -> &OpCode;
}
impl ProgramCounterOperations for u16 {
fn consume_instruction(&mut self, memory: &VirtualMemory) -> &OpCode {
unimplemented!()
}
| |__bytes |__files |__lines |__mixed |__spaces |__tabs
ABAP 25692832 2778 697211 99 420052 562
AGS Script 33344054 2580 565222 2289 125973 215653
AMPL 905191 368 21025 66 2024 682
ANTLR 66110389 9772 2749641 13120 797257 254780
API Blueprint 114440916 4526 3023810 5457 2050999 19683
APL 62421367 2941 1037348 1676 98844 30155
ASP 7244081547 1274648 164062174 2612002 64174914 62815523
ATS 44892762 10049 1911308 1039 508527 8279
ActionScript 23669781817 3660137 634446193 57808694 134936449 395368354
@166MMX
166MMX / PoorMansEnum.groovy
Created March 29, 2019 11:17
Poor Man's Enum
import groovy.transform.EqualsAndHashCode
@EqualsAndHashCode
class FooType {
private static final Map<String, FooType> nameMap = [:]
private static final Map<String, FooType> identifierMap = [:]
private static final Set<FooType> values = []
final String name
@166MMX
166MMX / __init__.py
Last active February 18, 2019 16:55
high entropy password generator tool with hashing capabilities
# https://docs.python.org/3/tutorial/modules.html#packages

Keybase proof

I hereby claim:

  • I am 166mmx on github.
  • I am 166_mmx (https://keybase.io/166_mmx) on keybase.
  • I have a public key whose fingerprint is AC06 96F3 F387 8427 7F3A 008C 9D6C 3876 341C 070C

To claim this, I am signing this object:

@166MMX
166MMX / test.svg
Last active December 13, 2017 23:22
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
var s = "";
s += 'Your client number is:';
s += document.getElementById('clientnumber').value;
s += '; Your user name is:';
s += document.getElementById('username').value;
s += 'Your password is: ';
s += document.getElementById('password').value;
alert(s);
@166MMX
166MMX / foo.css
Last active December 13, 2017 23:13
body {
background : url("https://cdn.rawgit.com/166MMX/4c518d3d9a53d8e22636ff910142bb0f/raw/42ffc39bea12db1135829ea33d84c0011073a1c9/test.svg") !important;
}