Skip to content

Instantly share code, notes, and snippets.

View netbsd-knf.el
;; NetBSD KNF style, adapted from the mailing list.
(c-add-style
"knf"
'((indent-tabs-mode . t)
(c-recognize-knr-p . t)
(c-basic-offset . 8)
(c-backslash-column . 72)
(c-backslash-max-column . 72)
(c-comment-only-line-offset . 0)
(c-cleanup-list . (brace-else-brace
@nhatminhle
nhatminhle / ca_rz.xkbmap
Created Mar 17, 2013
My own variation of the Canadian Multilingual Standard keymap. All AltGr combinations are on the right-hand side; modifiers are swapped around to fit various machines and keyboards that I have.
View ca_rz.xkbmap
default partial
xkb_symbols "basic" {
name[Group1] = "Canada (RZ)";
key <TLDE> { [ egrave, Egrave, degree ] };
key <AE01> { [ 1, exclam ] };
key <AE02> { [ 2, at ] };
key <AE03> { [ 3, numbersign ] };
key <AE04> { [ 4, dollar ] };
key <AE05> { [ 5, percent ] };
@nhatminhle
nhatminhle / stdatomic.h
Last active Oct 31, 2020
A portable version of stdatomic.h extracted from the FreeBSD libc, for Clang 3.1+ and GCC 4.7+.
View stdatomic.h
/*
* An implementation of C11 stdatomic.h directly borrowed from FreeBSD
* (original copyright follows), with minor modifications for
* portability to other systems. Works for recent Clang (that
* implement the feature c_atomic) and GCC 4.7+; includes
* compatibility for GCC below 4.7 but I wouldn't recommend it.
*
* Caveats and limitations:
* - Only the ``_Atomic parentheses'' notation is implemented, while
* the ``_Atomic space'' one is not.