Skip to content

Instantly share code, notes, and snippets.

View SplittyDev's full-sized avatar
🦀
crab dance

Marco Quinten SplittyDev

🦀
crab dance
View GitHub Profile
@SplittyDev
SplittyDev / triangular_spheres.js
Last active October 12, 2020 17:59
P5.js Abstract Shapes
// Created by Marco Quinten (@SplittyDev).
// License: Public Domain. Do whatever you want with the code.
const W = 5000;
const H = 5500;
function isInCircle(x, y, cx, cy, r) {
return (Math.pow(cx - x, 2) + Math.pow(cy - y, 2)) < Math.pow(r, 2);
}
@SplittyDev
SplittyDev / ContactForm.md
Last active October 12, 2020 17:47
Several coding tests I came up with..

Aufgabe: Kontaktformular

Ziel der Aufgabe ist es, ein visuell ansprechendes und funktionales Kontaktformular unter Verwendung moderner Webtechnologien zu erstellen.

Anforderungen

Technische Anforderungen

  • Eigene Entwicklungsumgebung einrichten
  • Webserver mit PHP und MySQL
  • Backend in PHP 7, MySQL
  • Frontend in HTML5, CSS3, JS ES6+ falls notwendig
@SplittyDev
SplittyDev / iodine_rfc_match.md
Last active August 23, 2017 02:23
Iodine RFC: Match Expression

Iodine RFC: Match Expression

Proposed syntax (modified EBNF)

EBNF Syntax:

() = GROUP
[] = OPTIONAL
{}* = ZERO OR MORE
{}+ = ONE OR MORE
/*
* JSON-RPC 2.0 implementation as per http://www.jsonrpc.org/specification.
* License: MIT (https://opensource.org/licenses/MIT)
* Author: Marco Quinten <splittydev@gmail.com>
*/
const debug = require('debug')('json-rpc');
// List of public API endpoints
var exposed = [];
@SplittyDev
SplittyDev / a_readme.md
Last active September 21, 2021 19:37
x86 bare metal protected mode itoa implementation

Freestanding x86 itoa implementation

For use in OS development.
Designed to be assembled with NASM, porting it over to other assemblers should be easy.

License

You are free to use, modify, distribute and sell this code.
A small message referring to this gist would be nice, though not required.

Important

This implementation uses a custom calling convention.

@SplittyDev
SplittyDev / eva.js
Created August 12, 2016 21:57
eva.js - The lightweight es6 event library.
// eva.js - The lightweight es6 event library.
var eva = (() => {
// Prepare local globals
var eva = {};
var receivers = [];
var gid = 0;
/**
* Verify the type of a parameter.
* Throw if the type does not match the expected type.
* @param {object} item - The argument itself
@SplittyDev
SplittyDev / test.html
Created July 11, 2016 03:10
Window Alert
<!-- The webpage should look something like that -->
<!DOCTYPE html>
<html>
<head>
<!-- Probably a few meta tags, scripts, etc here -->
<!-- Add the following to the end of the <head> section, just
before the </head> tag: -->
<script>
window.alert("Something!");
</script>

Keybase proof

I hereby claim:

  • I am splittydev on github.
  • I am splitty (https://keybase.io/splitty) on keybase.
  • I have a public key whose fingerprint is EA4E 6964 1BCD ECB7 F04C B3B5 7C7B 5F81 9AF8 3565

To claim this, I am signing this object:

var crypto = require('crypto')
var alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
function nextRand (lower, upper) {
'use strict'
return Math.floor(Math.random() * (upper - lower + 1) + lower)
}
function generateId () {
'use strict'
@SplittyDev
SplittyDev / WhirlpoolCryptoServiceProvider.cs
Last active October 9, 2021 12:24
Public domain Whirlpool implementation in C#
using System;
using System.Text;
namespace System.Security.Cryptography
{
public class WhirlpoolCryptoServiceProvider : HashAlgorithm
{
#region Constants
const int R = 10;