Skip to content

Instantly share code, notes, and snippets.

View ptitfred's full-sized avatar

Frédéric Menou ptitfred

View GitHub Profile
@ptitfred
ptitfred / Makefile
Created July 25, 2011 22:30
Makeflags regression (3.80-3.81)
all:
@echo MAKEFLAGS = $(MAKEFLAGS)
@ptitfred
ptitfred / server.cpp
Created October 5, 2010 21:17
C++ HTTP server
#include "server.hpp"
#include <iostream>
#include <fstream>
#include <sstream>
using std::cout;
using std::cerr;
using std::cin;
using std::endl;
using std::fstream;
@ptitfred
ptitfred / email-on-update.sh
Created August 28, 2010 20:28
Hook for Git emailing content of a push
#!/bin/bash
refname="$1"
oldrev="$2"
newrev="$3"
PATH=~/bin:$PATH
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
sudo adduser --disabled-password backuper
sudo su backuper
cd ~/.ssh
ssh-keygen -t dsa
# entrée pour ne pas saisir de passphrase
# entrée pour garder le nom par défaut, très satisfaisant