Skip to content

Instantly share code, notes, and snippets.

View .screenrc
# GNU Screen - main configuration file
# All other .screenrc files will source this file to inherit settings.
# Author: Christian Wills - cwills.sys@gmail.com
# Allow bold colors - necessary for some reason
attrcolor b ".I"
# Tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
@sshtmc
sshtmc / ubuntu-configure-sendmail-with-gmail
Created Oct 25, 2012
Ubuntu sendmail using smtp.gmail.com
View ubuntu-configure-sendmail-with-gmail
#!/bin/bash
HOST=$(hostname)
function install_postfix() {
echo | sudo debconf-set-selections <<__EOF
postfix postfix/root_address string
postfix postfix/rfc1035_violation boolean false
postfix postfix/mydomain_warning boolean
postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
@sshtmc
sshtmc / simple_c_vector.h
Created Sep 13, 2012
Simple vector-implementation in C
View simple_c_vector.h
#ifndef __SIMPLECVECTOR_H__
#define __SIMPLECVECTOR_H__
#include <stdlib.h>
#include <assert.h>
#include <string.h>
typedef struct vector_ {
void** data;
size_t used_entries;