Skip to content

Instantly share code, notes, and snippets.


Martynas Pumputis brb

View GitHub Profile
brb /
Created Oct 24, 2016
set -ue
brb /
Created Aug 16, 2016
ftrace example for kernel call graphs
echo 0 > /sys/kernel/debug/tracing/tracing_on
echo > /sys/kernel/debug/tracing/trace
echo function_graph > /sys/kernel/debug/tracing/current_tracer
echo $KERNEL_FUNCTION > /sys/kernel/debug/tracing/set_graph_function
echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 0 > /sys/kernel/debug/tracing/tracing_on
echo > /sys/kernel/debug/tracing/set_graph_function
brb / widen-gh-code-sections.user.js
Last active Aug 12, 2016
Greasemonkey extension (Chromium) for widening Github code sections at Issues pages
View widen-gh-code-sections.user.js
// ==UserScript==
// @name widen-gh-issues
// @description Widens code sections at Github issues pages
// @version 0.0.1
// @match*/*/issues/*
// @match*/*/pull/*
// ==/UserScript==
View withnetns_strace.log
This file has been truncated, but you can view the full file.
execve("./prog/weaveutil/weaveutil", ["./prog/weaveutil/weaveutil", "container-addrs", "weave", "09a29216781c", "859174e2a134", "6f1b45b7ca7f", "84ce7a1efba9", "4b78fdc29e51", "69dd95e85c99", "3b6f18e9cf59", "7266af2ad316", "77f96221b996", "f2cc8f7ba6fd", "44be62695f69", "6caa9c024124", "ee1a86ede15b", "b8cf2435ed46", "f352eaf0ac97", "09fc9dca3e9e", "5c9799078a84", "660ba4a51ef9", "4f2930f97dde", "2a8034422ae8", "21ca7c97d883", "754c0571e48c", "8281423c6b3b", "19328cdafdb8", "36027a3b2639", "e75efc9eae56", "625fd8775652", "86bb47219417", "2da4dd07188b", "4b7ef00a3dac", "a9cdbd956012", "44e62ebb4194", "fc06dddedbbb", "256f08324429", "6b9825a7542a"], [/* 17 vars */]) = 0
uname({sysname="Linux", nodename="fitzroy", ...}) = 0
brk(NULL) = 0x16c7000
brk(0x16c81c0) = 0x16c81c0
arch_prctl(ARCH_SET_FS, 0x16c7880) = 0
set_tid_address(0x16c7b50) = 3357
set_robust_list(0x16c7b60, 24) = 0
brb / menu.lst
Created Apr 15, 2015
Barrelfish menu.lst
View menu.lst
timeout 0
# spawnd is used to control which cpus are booted
# "spawnd boot" will use the skb and pci to figure out and
# boot all cores in the machine
# "spawnd boot bootapic-x86_64=1-5" will not use the skb and
# boot the list of cores passed as argument.
# The APIC id of the cores to boot should be specified.
brb /
Last active Aug 29, 2015
poor man's Elastic IP
# Update /etc/hosts with public non-elastic IPs of EC2 instances.
# Assumes that a name is set for each instance and there is only one value inside tags section.
FILTER=".Reservations[].Instances[] |
select(.PublicIpAddress != null) |
.PublicIpAddress + \" $PREFIX\" + .Tags[].Value"
brb / pinentry-gtk2-0.8.3_paste.patch
Created Jun 6, 2014
a hack to enable paste from clipboard for pinentry (gtk2, based on 0.8.3 vsn). fcks up the security (!)
View pinentry-gtk2-0.8.3_paste.patch
diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
index 421bc02..91a9fbf 100644
--- a/gtk+-2/pinentry-gtk-2.c
+++ b/gtk+-2/pinentry-gtk-2.c
@@ -186,7 +186,7 @@ button_clicked (GtkWidget *widget, gpointer data)
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (time_out)));
- s = gtk_secure_entry_get_text (GTK_SECURE_ENTRY (entry));
+ s = gtk_entry_get_text (GTK_ENTRY (entry));
brb /
Last active Nov 23, 2020
area41 2014 challenge writeup


Being a cheapass student, I couldn't resist to try to win a free entrance to [Area41 Security Conference][3] (don't mix with Alcoholics Anonymous Area 41 in Nebraska) after spotting @gandro23 retweet about the conference and the challenge.

Level 01

The challenge starts after downloading and extracting a [binary][1]. A quick look

brb / c.snippets
Created Oct 20, 2013
C code snippets for snipmate
View c.snippets
# main()
snippet main
main(int argc, const char **argv)
return 0;
snippet mainn
brb / prepare-commit-msg
Created Aug 1, 2013
Git hook for appending an issue id into commit messages. The issue id is taken from branch name which should be in a "foobar-ISSUE-ID" format.
View prepare-commit-msg
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
if [[ "$branch" =~ $regexp ]]; then
if [ "$2" = message ]; then
echo -ne "\n${refs_id}" >> "$1"
sed -i "1s/^$/\n\n${refs_id}/g" "$1"