Skip to content

Instantly share code, notes, and snippets.

View andersson's full-sized avatar

Bjorn Andersson andersson

View GitHub Profile
@andersson
andersson / git-am-and-tags
Created June 10, 2019 14:26
git am-and-tags - Apply patches and tags
#!/bin/bash -e
# Apply patches and tags directly from e.g. mutt
# Add following to .muttrc
# macro index,pager A "| git am-and-tags"
MSG=`cat; echo x`
SUBJECT=$(echo "${MSG%x}" |grep '^Subject:')
if [[ $SUBJECT == 'Subject: ['* ]]; then
@andersson
andersson / gist:259c25e9c6a00386c19e707e0ac14cc4
Created May 1, 2017 23:01
"btmgmt public-address"-alternative
#include <sys/socket.h>
#include <err.h>
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
struct sockaddr_hci {
sa_family_t hci_family;