Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am cwoac on github.
  • I am cwoac (https://keybase.io/cwoac) on keybase.
  • I have a public key ASC_M6DqacjWktigm3CFY4rJrHxl24db2SNZSzzvhRUtpwo

To claim this, I am signing this object:

This file has been truncated, but you can view the full file.
execve("/usr/bin/laverna", ["laverna"], [/* 30 vars */]) = 0
brk(NULL) = 0x5b8f000
readlink("/proc/self/exe", "/opt/laverna/laverna", 4096) = 20
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/opt/laverna/tls/x86_64/libnode.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/laverna/tls/x86_64", 0x7ffe343afd30) = -1 ENOENT (No such file or directory)
open("/opt/laverna/tls/libnode.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/laverna/tls", 0x7ffe343afd30) = -1 ENOENT (No such file or directory)
open("/opt/laverna/x86_64/libnode.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/opt/laverna/x86_64", 0x7ffe343afd30) = -1 ENOENT (No such file or directory)
@cwoac
cwoac / gist:7412148
Last active December 28, 2015 00:18
assignment3.cpp
// C for C programmers
// Assignment 3
// compiles and runs under g++ 4.8.1 with -std=c++11 also
// with strict language and error checking turned on
// (-ansi -std=c++11 -Wall -Wextra -Werror -Wpedantic)
//
// Note that I do NOT use 'using namespace std' - this is considered
// bad practise as it leads to namespace pollution - see, for instance,
// the style guide linked to in the course:
// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces
// C for C programmers
// Assignment 2
// compiles and runs under g++ 4.8.1 with no options and also
// with strict language and error checking turned on
// (-ansi -std=c++98 -Wall -Wextra -Werror -Wpedantic)
//
// Note that I do NOT use 'using namespace std' - this is considered
// bad practise as it leads to namespace pollution - see, for instance,
// the style guide linked to in the course:
// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces
@cwoac
cwoac / gist:6521557
Created September 11, 2013 09:54
Patch for redir on x64
--- redir.c 2013-09-11 10:45:39.694593685 +0100
+++ redir.c.orig 1999-12-26 20:50:06.000000000 +0000
@@ -78,7 +78,6 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
-#include <time.h>
#ifdef USE_TCP_WRAPPERS
#include <tcpd.h>
@cwoac
cwoac / gist:5844398
Created June 23, 2013 09:22
gmp failing to build in 32bit mode in brew
==> Downloading ftp://ftp.gmplib.org/pub/gmp-5.1.2/gmp-5.1.2.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gmp-5.1.2.tar.bz2
tar xf /Library/Caches/Homebrew/gmp-5.1.2.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/gmp/5.1.2 --enable-cxx
./configure --prefix=/usr/local/Cellar/gmp/5.1.2 --enable-cxx
checking build system type... atom-apple-darwin10.8.0
checking host system type... atom-apple-darwin10.8.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
@cwoac
cwoac / gist:5841444
Created June 22, 2013 16:16
Bug compiling GMP in brew
leander:~ oliver$ brew doctor
Your system is ready to brew.
leander:~ oliver$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: 35fc7adc02b9d1e04584b8105447684f0bb164f3
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 32-bit penryn
OS X: 10.6.8-i386
#!/usr/bin/python
"""
Copyright (c) 2009 Simeon Franklin
MIT Licensed: see http://www.opensource.org/licenses/mit-license.php
pydelatt.py - Strips attachments from maildir format mail
files. Sample usage:
$ find ./Maildir -mtime +120 -size +3M | xargs -ix pydelatt.py -v 'x'