Skip to content

Instantly share code, notes, and snippets.

View poizan42's full-sized avatar

Kasper Fabæch Brandt poizan42

View GitHub Profile
@poizan42
poizan42 / dhcp-dyndns-async.sh
Last active August 12, 2023 23:12
isc-dhcp-server Samba dyndns update scripts
#!/bin/bash
exec_async()
{
logger -t "dhcp-dyndns-async" "Running in background as pid $$"
output="$(/usr/local/bin/dhcp-dyndns.sh "$@")"
ret="$?"
if [[ $ret -ne 0 ]]; then
logger -p user.err -t "dhcp-dyndns-async" "dhcp-dyndns.sh failed with exit code $ret"
logger -p user.err -t "dhcp-dyndns-async" "output: $output"
@poizan42
poizan42 / Two Of These People Are Lying.md
Last active October 14, 2023 10:59
"Two Of These People Are Lying" summary

1x01

Kebakko

Chris: Kebakko is a Polish sausage company, kielbasa company, formed mid-70s
Gary: Kebakko is a type if Finnish convenience food, it's a bit like a meatball, it's a bit like a kebab
Matt: Marcel Kebakko was the more famous of them and they were touring circus artists

Tom guessed Matt, Gary was correct
Matt: 1

Lentokenttä

=========================================================================================
<link cmd="!PDE.help">Help</link> for <b>Prototype Debugger Extension (PDE) v11.3</b> - Copyright 2009-2017 Andrew Richards
=========================================================================================
!seek - Equivalent of ~*knL and/or !deep 1
!seek [-q] [-e symbol] [&lt;symbol&gt; [command]]
- Execute 'command' against stacks that contain 'symbol'
(Note, don't include a displacement in the specified symbol)
- Specify '-q' (quiet) to omit the per-thread header
@poizan42
poizan42 / Form1.Designer.cs
Last active October 25, 2019 14:09
ExecutionEngineException thrown when using ICustomQueryInterface to implement IDocHostUIHandler
namespace WebBrowserCustomSiteTest
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
@poizan42
poizan42 / revenc.py
Last active September 4, 2019 20:53
A tool for finding encodings that encodes a given string to a given binary value, or for finding possible combinations of encoding+decoding that would convert a string to a given mojibake
#/usr/bin/env python3
import re
import sys
import encodings
import pkgutil
all_encodings = set()
for _, modname, _ in pkgutil.iter_modules(
encodings.__path__, encodings.__name__ + '.',
@poizan42
poizan42 / .config
Last active August 20, 2019 15:01
crosstool-ng#962 failure
#
# Automatically generated file; DO NOT EDIT.
# crosstool-NG Configuration
#
CT_CONFIGURE_has_static_link=y
CT_CONFIGURE_has_cxx11=y
CT_CONFIGURE_has_wget=y
CT_CONFIGURE_has_make_3_81_or_newer=y
CT_CONFIGURE_has_make_4_0_or_newer=y
CT_CONFIGURE_has_libtool_2_4_or_newer=y
@poizan42
poizan42 / test.bin
Last active October 6, 2019 11:48
File that break ZOutputStream from BouncyCastle (fixed in https://github.com/bcgit/bc-csharp/commit/558d089c314c1d226af7a3a389df9191e4d0f95c)
@poizan42
poizan42 / Excluded.cs
Last active September 5, 2018 06:37
Project with excluded cs file testcase for https://github.com/hvanbakel/CsprojToVs2017/issues/190
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExcludedFileTest
{
I do not compile!
class Excluded
Makefile:126: The docker client CLI has moved to github.com/docker/cli. For a dev-test cycle involving the CLI, run:
DOCKER_CLI_PATH=/host/path/to/cli/binary make shell
then change the cli and compile into a binary at the same location.
docker build -t "docker-dev:master" -f "Dockerfile" .
Sending build context to Docker daemon 251.1MB
Step 1/94 : FROM golang:1.10.3 AS base
---> 4e611157870f
Step 2/94 : ENV GO_VERSION 1.10.3
@poizan42
poizan42 / MailSend.cs
Created June 14, 2018 16:18
Demonstration of bad heuristics in som AV products, old-style .csproj edition, see https://poizan.dk/blog/2018/06/14/the-dangerous-mailsend-antivirus-heuristics-fail/
class Program
{
public const string pad =
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +