Skip to content

Instantly share code, notes, and snippets.

View troglobit's full-sized avatar

Joachim Wiberg troglobit

View GitHub Profile
@jessfraz
jessfraz / proposal.md
Last active September 15, 2017 02:59

Self isolating binaries

This is a play proposal for a new wrapper around go build that would build your binary but wrap it in code that would prepare isolation around your binary on run.

A concept of this is in https://github.com/jfrazelle/binctr, in that it takes a docker image and embeds the contents into a final binary so you have a self-contained binary.

The binctr example is unnessesarily heavy for go binaries because all you need is a completely static binary.

@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active March 31, 2025 15:46
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@vhodges
vhodges / metropolis.css
Last active December 9, 2025 22:51
A version of the Beamer theme Metropolis for reveal.js
/**
* A simple theme for reveal.js presentations, derived from serif.css
* It's in the spirit of the Metropolis theme for beamer https://github.com/matze/mtheme
*
* This theme is Copyright (C) 2016 Vince Hodges, http://sourdoughlabs.com - it is MIT licensed.
*/
@import url('https://fonts.googleapis.com/css?family=Fira+Sans');
.reveal a {
wkz@wkz-box:~$ time cat /proc/kallsyms | awk '{ print $NF; exit 0 }'
irq_stack_union
real 0m0.003s
user 0m0.000s
sys 0m0.000s
wkz@wkz-box:~$ time cat /proc/kallsyms | awk 'END{ print $NF }'
[wmi]
real 0m0.064s

Setup

curl -sSL -o clone.c goo.gl/G45N5X

Net Namespace

# on host
@jessfraz
jessfraz / clone.c
Last active September 25, 2018 19:40
clone.c
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
#include <sys/wait.h>
#include <errno.h>
#define STACKSIZE (1024*1024)
static char child_stack[STACKSIZE];
@wkz
wkz / Makefile
Last active February 3, 2016 23:27
flip:
@echo '\\/' | sed -e 's:\\/://\\:'
flip-adv:
@echo '\\/' | sed -e 's/\\\//\/\/\\/'
flip-evil:
@echo "\\\\\/" | sed -e "s/\\\\\\\\\//\/\/\\\/"
TroglOS Linux 1.0-beta5 chaos /dev/ttyAMA0
chaos login: root
(@-
//\ TroglOS Linux :: Troglobit Software
V_/_ Chaos Release :: http://troglobit.com
~ # echo 'kprobe:do_sys_open { trace("hello, world!\n") }' | /dtl
syslogd-37 [000] d... 6.067101: : hello, world!
sh-63 [000] d... 6.074971: : hello, world!
@lanoxx
lanoxx / 0001.patch
Created October 29, 2015 14:08
CFGF_DEPRECATED and CFGF_DROP
From 07b6b7dc8082850d84516d1d4f1ebda20e192cc5 Mon Sep 17 00:00:00 2001
From: Sebastian Geiger <[email protected]>
Date: Thu, 29 Oct 2015 15:05:35 +0100
Subject: [PATCH] Implementation draft for deprecated and drop flags
---
examples/Makefile.am | 6 +++---
examples/cfgdeprecated.c | 33 +++++++++++++++++++++++++++++++++
examples/cfgdeprecated.conf | 3 +++
src/confuse.c | 21 +++++++++++++++++++++
@bcambl
bcambl / gnome3-xfce4-xrdp.sh
Created October 8, 2015 02:21
Setup Fedora 23 Gnome3 with xRDP via XFCE4
#!/bin/bash
#################################################
# Setup Fedora 23 Gnome3 with xRDP via XFCE4
#################################################
# install the XFCE4 desktop
sudo dnf groupinstall xfce-desktop
# open standard RDP ports
sudo firewall-cmd --add-port=3389/tcp