Skip to content

Instantly share code, notes, and snippets.

@mtmr
mtmr / cheatsheet
Last active August 29, 2015 14:24
# Basic commands
:Git [args] # does what you'd expect
all of your `~/.gitconfig` aliases are available.
:Git! [args] # same as before, dumping output to a tmp file
Moving inside a repo.
@mtmr
mtmr / printpid.c
Created February 15, 2015 14:24
printpid.c
/* Copyright 2001 */
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int main(void) {
printf("%ld %ld", (long)getpid(), (long)getppid());
pid_t pid = fork();
if(pid == 0)
{
printf("Hello World %ld", (long)getpid());