Skip to content

Instantly share code, notes, and snippets.

View dfischer's full-sized avatar
🔥
cooking

0x44 0x46 dfischer

🔥
cooking
View GitHub Profile
#https://twitter.com/officialmcafee/status/1397568860082122752
#https://twitter.com/ahakcil/status/1397888724936105987
import random
import copy
RST = '\033[0m'
def rand_data(size):
d = []
@dfischer
dfischer / MergeNodeAlgorithm.hpp
Created September 18, 2021 15:15 — forked from vy/MergeNodeAlgorithm.hpp
Merging Two Binary Search Trees in O(logn) Space
#ifndef MERGE_NODE_ALGORITHM_HPP
#define MERGE_NODE_ALGORITHM_HPP
template <class T>
class MergeNodeAlgorithm {
public:
virtual bool empty() const = 0;
virtual void pop() = 0;
virtual T get() const = 0;
@dfischer
dfischer / 0_tweegeemee.txt
Created August 21, 2021 16:06 — forked from rogerallen/0_tweegeemee.txt
tweegeemee archive 10/19/2019
Archive of the code for images posted to https://twitter.com/tweegeemee
Started October 19, 2019
:clisk-random-seed 191019
Learn more at https://github.com/rogerallen/tweegeemee
@dfischer
dfischer / carl_hewitt_actor_model.md
Created March 31, 2021 23:03 — forked from rbishop/carl_hewitt_actor_model.md
Notes from Carl Hewitt on the Actor Model

Carl Hewitt on Actors

Actor - Fundamental unit of computation, a computation model - not just a form of concurrency

An Actor has three essential elements:

  • 1 - Processing - you have to get something done
  • 2 - Storage - you have to be able to remember things
  • 3 - Communication
@dfischer
dfischer / octal_x86.txt
Created March 21, 2021 04:08 — forked from seanjensengrey/octal_x86.txt
x86 is an octal machine
# source:http://reocities.com/SiliconValley/heights/7052/opcode.txt
From: [email protected] (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
@dfischer
dfischer / coinswap.txt
Created March 19, 2021 23:40 — forked from adlai/coinswap.txt
Adapting CoinSwap for a Fungibility Market
In the protocol all parties are assumed to have private communications channels.
Phase 0. Sets up the escrows and their timeout refunds.
Phase 1. Makes it so that if Bob gets paid there is no way for Alice to fail to get paid.
Phase 2. Just releases the escrows directly because everyone is happy that cheating isn't possible.
Alice Bob
=========================================================
0. Compute TX_0: A>2of2{A,B'} | Compute TX_1: B>2of2{B,A'} \
1. Send TX_0 TXID ------------> |
@dfischer
dfischer / null.py
Created March 10, 2021 17:50 — forked from kernc/null.py
Null object pattern (Python)
"""
This module provides the Null class for the null object design pattern.
"""
from collections import MutableMapping, MutableSequence
class _MetaNull(type): pass
class Null(type):
"""Null object design pattern.
@dfischer
dfischer / lbForth.c
Created February 8, 2021 13:38 — forked from lbruder/lbForth.c
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@dfischer
dfischer / SIMPL_MSP430ASM_6
Created February 6, 2021 09:19 — forked from monsonite/SIMPL_MSP430ASM_6
SIMPL - a tiny forth like language implemented in under 900 bytes of MSP430 Assembly Language (For MSP430G2553 Launchpad)
;-------------------------------------------------------------------------------
; SIMPL - a very small Forth Inspired Extensible Language
; Implementing the Initialisation, TextTead, TextEval and UART routines in MSP430 assembly language
;
; A Forth-Like Language in under 1024 bytes
; Ken Boak May 22nd/23rd 2017
; Loops, I/O, Strings and Delays added
; This version 888 bytes
; SIMPL_430ASM_6
@dfischer
dfischer / TinyForth.asm
Created February 6, 2021 09:18 — forked from anonymous/TinyForth.asm
A Tiny Implementation of forth in AVR assebly language by T. Nakagawa - assembles to about 1800 bytes
; Tiny FORTH
; T. NAKAGAWA
; 2004/08/02-05
; Register
; r0: temporary
; r1-15: input buffer (terminated by 0x00, separated by 0x20)
; r16: temporary
; r17: temporary
; r18: temporary
; r19: temporary