Skip to content

Instantly share code, notes, and snippets.

View ianpartridge's full-sized avatar

Ian Partridge ianpartridge

  • IBM
  • UK
View GitHub Profile
#!/bin/bash
# Shell script to change a Swift package dependency to another branch
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
git checkout $1
@ianpartridge
ianpartridge / timerfdtest.c
Last active July 4, 2023 08:20
epoll timerfd example
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/epoll.h>
#include <sys/timerfd.h>
static char *itimerspec_dump(struct itimerspec *ts);