Skip to content

Instantly share code, notes, and snippets.

@dafrancis
dafrancis / color.h
Created November 14, 2011 21:29
"Zed's Awesome Debug Macros" from Exercise 20 of "Learn C the Hard Way" (http://c.learncodethehardway.org/). Now with added colours! (Yes I know I use "color" in the code)
#ifndef __color_h__
#define __color_h__
/*
* I got some of the colour codes (as well as having the idea of putting them in a macro) from here:
* http://stackoverflow.com/questions/3506504/c-code-changes-terminal-text-color-how-to-restore-defaults-linux
*/
#define RED "\e[31m"
#define GREEN "\e[32m"
@clsn
clsn / .dir_colors
Created February 3, 2012 05:54
Coolest .dir_colors ever
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996, 1999-2010 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Possibly useful emacs-lisp to show the colors:
# (font-lock-add-keywords nil '(("38;5;\\([1-9][0-9]+\\)" (1 `(face (:background ,((lambda (c) (let* ((x (- (string-to-int c) 16)) (arr '("00" "5f" "87" "af" "d7" "ff")) (blue (mod x 6)) (green (mod (/ x 6) 6)) (red (mod (/ x 36) 6))) (if (> x 215) (let* ((z (- x 216)) (s (nth z '("08" "12" "1c" "26" "30" "3a" "44" "4e" "58" "62" "6c" "76" "80" "8a" "94" "9e" "a8" "b2" "bc" "c6" "d0" "da" "e4" "ee" "ff")))) (concat "#" s s s)) (concat "#" (nth red arr) (nth green arr) (nth blue arr))))) (match-stri
@pascalpoitras
pascalpoitras / config.md
Last active April 8, 2024 18:58
My WeeChat configuration

WeeChat Screenshot

Mouse


enable