Skip to content

Instantly share code, notes, and snippets.

@xu48169172
xu48169172 / build-git.sh
Created January 13, 2018 00:00 — forked from pescobar/build-git.sh
compile git with openssl instead of gnutls
#!/usr/bin/env bash
# Clear out all previous attempts
rm -rf "/tmp/source-git/"
# Get the dependencies for git, then get openssl
sudo apt-get install build-essential fakeroot dpkg-dev -y
sudo apt-get build-dep git -y
sudo apt-get install libcurl4-openssl-dev -y
mkdir -p "/tmp/source-git/"
@xu48169172
xu48169172 / gist:a7278fd545414d319a3c692a90b996a3
Created June 24, 2017 07:22 — forked from tausen/gist:4261887
pthread, sem_wait, sem_post example
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <semaphore.h>
sem_t semaphore;
void threadfunc() {