Skip to content

Instantly share code, notes, and snippets.

View jarkko-hautakorpi's full-sized avatar

Jarkko jarkko-hautakorpi

View GitHub Profile
@milo
milo / github-webhook-handler.php
Last active October 29, 2024 15:45
GitHub Webhook Handler
<?php
/**
* GitHub webhook handler template.
*
* @see https://docs.github.com/webhooks/
* @author Miloslav Hůla (https://github.com/milo)
*/
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check
@sahib
sahib / semaphor.c
Last active September 4, 2019 10:22
A rather primitive Semaphore implementation in C using pthreads
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
/* Stupid implementation of C semaphores with pthreads.
* Used as mutex for counting a variable below.
*
* compile with:
*
* cc semaphor.c -o sam -lpthread -Wall -Wextra -std=c99 -Os