Skip to content

Instantly share code, notes, and snippets.

View thadumi's full-sized avatar
🎸
Rock'N'Code

Theo Dumitrescu thadumi

🎸
Rock'N'Code
View GitHub Profile
@thadumi
thadumi / 0main.md
Created February 4, 2021 10:17 — forked from canton7/0main.md
Local versions of tracked config files

How to have local versions of tracked config files in git

This is a fairly common question, and there isn't a One True Answer.

These are the most common techniques:

If you can modify your application

@thadumi
thadumi / cond.c
Created December 3, 2020 16:24 — forked from rtv/cond.c
An example of using pthread's condition variables, showing how to block a main thread while waiting for worker threads to finish their work, without joining the threads. This could be useful if you want to loop the threads, for example.
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
/* Compile like this:
gcc --std=c99 -lpthread cond.c -o cond