Skip to content

Instantly share code, notes, and snippets.

Axel Wagner Merovius

Block or report user

Report or block Merovius

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Merovius
Merovius / fdg.js
Created May 16, 2019
Force-directed graph drawing
View fdg.js
function Graph(div, edges, update) {
let g = this;
let c = document.createElement("canvas");
c.width = '800';
c.height = '400';
c.style.background = '#ffffff';
div.appendChild(c);
div.appendChild(document.createElement("br"));
let runSim = document.createElement("input");
@Merovius
Merovius / go-birdseye.md
Created Apr 2, 2019
A birdseye view of Go
View go-birdseye.md

When we talk about "Go", depending on context, we can mean very different things. This is my attempt at providing the furthest possible overview of the language and ecosystem and to link to the relevant documentation about how each part fits together. So, let's dive in:

The Go programming language

The bottom turtle is Go, the programming language. It defines the format and meaning of source code and the authoritative source for how it works is [the Go

View go.mod
module github.com/gobuffalo/buffalo
require (
github.com/dgrijalva/jwt-go v0.0.0-20180308231308-06ea1031745c
github.com/dustin/go-humanize v0.0.0-20180421182945-02af3965c54e
github.com/fatih/color v1.7.0
github.com/fatih/structs v1.0.0
github.com/fsnotify/fsnotify v1.4.7
github.com/gobuffalo/envy v1.6.2
github.com/gobuffalo/packr v1.11.0
@Merovius
Merovius / defence.go
Created Feb 25, 2018
tiny tool to extract codeblocks from markdown
View defence.go
package main
import (
"bufio"
"flag"
"fmt"
"os"
"strings"
)
@Merovius
Merovius / entropy.go
Last active Jan 15, 2018
Generating entropy without imports in Go
View entropy.go
// https://blog.merovius.de/2018/01/15/generating_entropy_without_imports_in_go.html
package main
import "fmt"
func main() {
fmt.Println(MapIteration())
fmt.Println(Select())
fmt.Println(RaceCondition())
@Merovius
Merovius / 01.txt
Last active Sep 14, 2017
Was ist eigentlich dieses "internet" von dem immer alle reden?
View 01.txt
__ __ _ _ _ _ _ _ _ _ _
\ \ / /_ _ ___ (_)__| |_ ___(_)__ _ ___ _ _| |_| (_)__| |_ __| (_)___ ___ ___ ___
\ \/\/ / _` (_-< | (_-< _/ -_) / _` / -_) ' \ _| | / _| ' \ / _` | / -_|_-</ -_|_-<
\_/\_/\__,_/__/ |_/__/\__\___|_\__, \___|_||_\__|_|_\__|_||_| \__,_|_\___/__/\___/__/
|___/
_ _ ___ _ _ _ _ _ _
( | )_ _|_ _| |_ ___ _ _ _ _ ___| |_( | ) __ _____ _ _ __| |___ _ __ (_)_ __ _ __ ___ _ _
V V | || ' \ _/ -_) '_| ' \/ -_) _|V V \ V / _ \ ' \ / _` / -_) ' \ | | ' \| ' \/ -_) '_|
View keybase.md

Keybase proof

I hereby claim:

  • I am Merovius on github.
  • I am merovius (https://keybase.io/merovius) on keybase.
  • I have a public key whose fingerprint is CC3C C48D 048E 77B6 CAF0 B8DF 0426 F4D1 2C27 A9D4

To claim this, I am signing this object:

@Merovius
Merovius / test.c
Created Nov 9, 2016
Demonstrate that stdin/stdout/stderr are only conventions.
View test.c
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
// Demonstrate, that stdin, stdout, stderr are only conventional. We run a child
// process which doesn't have them open and open a random file to demonstrate,
@Merovius
Merovius / main.go
Created Sep 11, 2014
Code für die c¼h "go tooling"
View main.go
package main
import (
"flag"
"fmt"
"go/ast"
"go/build"
"go/parser"
"go/token"
"io"
View perm.go
package main
import (
"fmt"
"math/rand"
"sort"
"time"
)
// Naive solution, create a new array and copy elements in right order. This
You can’t perform that action at this time.