Skip to content

Instantly share code, notes, and snippets.

View flyx's full-sized avatar

Felix Krause flyx

View GitHub Profile
@flyx
flyx / test.nim
Last active August 29, 2015 14:18
import macros
macro callFilter(filter: stmt, value: stmt): expr =
if value.kind == nnkStrLit:
newStmtList(
newNimNode(nnkConstSection).add(newNimNode(nnkConstDef).add(newIdentNode("filtered"), newEmptyNode(),
newCall(filter, value))),
newIdentNode("filtered"))
else:
newCall(filter, value)
@flyx
flyx / newcert.expect
Created September 12, 2015 21:13
expect script to create and sign a new OpenSSL cert/key pair
#!/usr/bin/expect -f
#
# creates a new key/cert pair with openssl and signs it with a local CA
#
# expects /etc/ssl/openssl.cnf to provide correct defaults to everything
# except the CN. Easily modifyable to handle more parameters.
#
# usage: ./newcert.key CN capass
#
# * CN: the name of your website, eg example.com
@flyx
flyx / Makefile
Last active September 17, 2015 08:26
making it work
# Makefile to make it work
it:
@echo > /dev/null
work:
@echo "aye!"
# support for Picard
so:
@echo "Warp 9 engaged."
.PHONY: it work so
@flyx
flyx / main.adb
Created February 23, 2021 20:51
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Containers.Hashed_Maps; use Ada.Containers;
with Ada.Iterator_Interfaces;
procedure Main is
package Tiles is
-- Implementation is completely hidden
type Tile_Type is private;
@flyx
flyx / Readme.md
Created February 18, 2023 12:41
Simple plugin to use mermaid.js in a jekyll-asciidoc + just-the-docs setup

Requires a working mermaid setup for just-the-docs.

Place the file below in the _plugins folder of your site. Now in your AsciiDoc files, you can do

[mermaid]
....
graph TD;
    A-->B;
 A-->C;