Skip to content

Instantly share code, notes, and snippets.

View draptik's full-sized avatar

Patrick Drechsler draptik

View GitHub Profile
@draptik
draptik / 2024-socrates.md
Last active December 21, 2023 20:26
2024-barcamps

2024

A collection of SoCraTes BarCamps in 2024

If there is a list like this present: please point me to it.

Yes: have a look at https://www.softwarecrafters.org/

Also: "SoCraTes" is just a name. Anything else with the same fibe: please add it! For example "DevOps Camp Franken".

@draptik
draptik / slides.md
Created June 9, 2021 19:48
slidev-resolution-01
theme layout
default
default

This is a long title, but it's on a single line with 4k

There are 13 bullet points

  • foo01
@draptik
draptik / fsharp-safe-problems.md
Last active January 1, 2021 03:12
Problems with F# SAFE linux 2020

Problems with SAFE Demos

I'm having trouble using the provided documentation/demos.

Main problems:

  • linux: demos are often windows-centric
  • since I'm using linux, I can't use .NET-Framework4.x... -> dotnet core (dotnet core 5)
  • FAKE and Paket have evolved, but most of the examples provided on https://safe-stack.github.io/docs/learning/ will not compile under linux
  • NOTE: while learning SAFE, I don't want to spend my time also learning a new build system (FAKE) and
@draptik
draptik / create-certificate.sh
Created March 18, 2020 14:57
create self-signed server and client certificate with openssl
#!/bin/bash
## Create self signed certificate (server and client)
##
## Combination of
##
## - https://medium.com/the-new-control-plane/generating-self-signed-certificates-on-windows-7812a600c2d8
## - https://www.makethenmakeinstall.com/2014/05/ssl-client-authentication-step-by-step/
##
## Configuration file: `openssl.cnf` contains information about the site being configured.
-- https://mystery.knightlab.com/walkthrough.html
-- witness 1
--SELECT * from interview where person_id = 14887
--select * from get_fit_now_member where id like '48Z%' and membership_status = 'gold'
--select * from drivers_license where plate_number like '%H42W%'
-- witness 1
--select p.* from person p
--join drivers_license dl on p.license_id = dl.id
@draptik
draptik / clmystery-solution.md
Last active February 4, 2024 17:42
A solution to clmystery: A Command line murder mystery (https://github.com/veltman/clmystery)

Solving the riddle

A solution to clmystery: Command line murder mystery.

Get all clues

grep "CLUE" crimescene

CLUE: Footage from an ATM security camera is blurry but shows that the perpetrator is a tall male, at least 6'.
#!/bin/bash
INPUT_FILE="vo_all.pdf"
OUTPUT_FILE_BASE="vo_all_output"
pdfjam --nup 2x3 \
--frame true \
--noautoscale false \
--delta "0.2cm 0.3cm" \
--scale 0.95 \
#!/bin/bash
## Temporary workaround for ncurses bug (https://github.com/dotnet/corefx/issues/26966#issuecomment-367066252)
export TERM=xterm
DEMOPROJECT=MyLib
## Cleanup
rm -rf $DEMOPROJECT
@draptik
draptik / Class1.cs
Created July 31, 2017 21:15
xunit-net-collection-fixtures
using FluentAssertions;
using Xunit;
namespace FooTests
{
/// <summary>
/// https://xunit.github.io/docs/shared-context.html#collection-fixture
///
/// Important note: Fixtures can be shared across assemblies, but collection definitions must
/// be in the same assembly as the test that uses them.
@draptik
draptik / .gitconfig
Created March 14, 2017 21:51
git settings
[push]
default = simple
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ec = config --global -e
s = status
co = checkout
cob = checkout -b
up = pull --rebase
cm = !git add -A && git commit -m