Skip to content

Instantly share code, notes, and snippets.

@bisqwit
bisqwit / runXterm.cc
Created October 5, 2017 06:54
My Xterm launcher script
#include <vector>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <unistd.h>
#include <cstdio>
using namespace std;
/* saturation, value and hue all are 0..1 */
@rofl0r
rofl0r / init.c
Created August 6, 2013 21:15
minimal init daemon by rich felker, author of musl libc
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;
@parse
parse / shell.c
Created May 11, 2011 07:31
Simple shell in C
/* Compile with: g++ -Wall –Werror -o shell shell.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>