Skip to content

Instantly share code, notes, and snippets.

View Ulu2005's full-sized avatar

Kowa Ulu2005

View GitHub Profile
/*
* csapp.h - prototypes and definitions for the CS:APP3e book
*/
/* $begin csapp.h */
#ifndef __CSAPP_H__
#define __CSAPP_H__
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
@Ulu2005
Ulu2005 / vi cheat sheet.md
Created October 7, 2014 20:07
Vi Cheat Sheet

Cursor movement

h - move left
j - move down
k - move up
l - move right
w - jump by start of words (punctuation considered words)
W - jump by words (spaces separate words)

e - jump to end of words (punctuation considered words)

@Ulu2005
Ulu2005 / csapp.c
Last active August 29, 2015 14:07
csapp
/*
* csapp.c - Functions for the CS:APP3e book
*
* Updated 10/2014 droh:
* - Added safe_printf, anasync-signal-safe wrapper for printf
*
* Updated 8/2014 droh:
* - New versions of open_clientfd and open_listenfd are reentrant and
* protocol independent.
*
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results