Skip to content

Instantly share code, notes, and snippets.

Naveen Nathan nnathan

  • Democratic Republic of the Congo
View GitHub Profile
View .muttrc
# imap
## .muttrc_auth should contain the following
## set folder = "imaps://"
## set imap_user = ""
## set imap_pass = "hunter2"
source ~/.muttrc_auth
set imap_idle = yes
set spoolfile = "+INBOX" # specifies default mailbox
set postponed = "+INBOX/Drafts" # stores a copy of message until its sent (draft)
nnathan / .bash_profile
Last active Apr 20, 2019
View .bash_profile
local rc=$?
[[ $(history 1) =~ ^\ *[0-9]+\ +([^\ ]+\ [^\ ]+)\ +(.*)$ ]]
local date_part="${BASH_REMATCH[1]}"
local command_part="${BASH_REMATCH[2]}"
if [ "$command_part" != "$PERSISTENT_HISTORY_LAST" ]
nnathan / r.c
Last active Jan 8, 2019
regex alternation is not commutative
View r.c
/* turns out this is wrong, the regex "quic | noise" contains spaces you need to consider */
* $ ./r
* "quic | noise" matches "high pitched noise coming from car"
* $ ./r s
* "noise | quic" matches "a quick fix"
* "noise | quic" matches "high pitched noise coming from car"
#include <stdio.h>
nnathan / broke.mbox
Created Jan 7, 2019
mbox demonstrating mutt regex ~s "noise | quic" is not the same as ~s "quic | noise"
View broke.mbox
From Tue Jan 8 09:37:45 2019
Date: Tue, 8 Jan 2019 09:37:45 +1100
To: a@b.c
Subject: a quick fix
Message-ID: <20190107223745.GA1689@Administrators-MacBook-Pro-3.local>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.11.1 (2018-12-01)
View qsort.c
/* A simple qsort implementation on linked lists */
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
* A 'node' is an element of the linked list, containing a pointer
* to the next element, and the associated data
* A full list is represented by a pointer to its first element
nnathan / slqueue.c
Created Jan 3, 2019
Understanding BSD queue.h single linked list implementation
View slqueue.c
* See queue(3) or for reference.
#include <stdio.h>
#include <sys/queue.h>
struct Pattern {
char name[100];
/* Following expands to:
View .nvimrc
call plug#begin()
Plug 'fatih/vim-go', { 'tag': '*' }
Plug 'flazz/vim-colorschemes'
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'sebdah/vim-delve'
Plug 'Shougo/neosnippet.vim'
Plug 'Shougo/neosnippet-snippets'
Plug 'tpope/vim-sleuth'
Plug 'tpope/vim-fugitive'
View .vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-sleuth'


It seems that the microphone doesn't register with Google Chrome sometimes. This is partly to do with CoreAudio in OSX.


It seems if you google around, that people just willy-nilly sudo pkill -f coreaudiod which then restarts and should register microphone services.

View gist:41ab46f71c45fa8ec9b9db3da7ff9961
late night alumni - empty streets
solarstone & clare stagg - jewel (daniel kandi remix)
andain - what it's like (sneidjer remix)
vast vision - behind your smile (suncatcher remix)
bjorn akesson - castle technology
alex m.o.r.p.h - eternal flame
Above & Beyond - No one On Earth (Gabriel and Dresden Remix)
Yuri Kane VS Armin & Sharon - Right Back... and Love (Soulplay Extended Mash)
rank 1 & alex morph - and then
rank 1 - opus 17
You can’t perform that action at this time.