Skip to content

Instantly share code, notes, and snippets.

@mmonaco
mmonaco / boot.log
Created September 8, 2012 18:51
crosstools-ng build failure
This file has been truncated, but you can view the full file.
[INFO ] Performing some trivial sanity checks
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] Testing '! ( -n )'
[DEBUG] ==> Executing: 'mkdir' '-p' '/home/matt/Local/zedboard/.build'
[DEBUG] ==> Executing: 'touch' '/home/matt/Local/zedboard/.build/foo'
[DEBUG] Testing '! ( -f /home/matt/Local/zedboard/.build/FOO )'
[DEBUG] ==> Executing: 'rm' '-f' '/home/matt/Local/zedboard/.build/foo'
[DEBUG] Testing '-f /bin/bash -a -x /bin/bash'
@mmonaco
mmonaco / .config
Created September 8, 2012 21:27
More build failures
#
# Automatically generated make config: don't edit
# crosstool-NG 1.16.0 Configuration
# Fri Sep 7 15:41:38 2012
#
CT_CONFIGURE_has_xz=y
CT_CONFIGURE_has_cvs=y
CT_CONFIGURE_has_svn=y
CT_MODULES=y
#!/bin/bash
info() {
printf "Xsession: $*\n" >&2
}
info "hello!"
info "running from -- $0"
#command env | grep -v ^LESS_TERMCAP | sort > ~/Local/ENV_PRE_PROFILE
@mmonaco
mmonaco / write-mime-multipart
Created September 29, 2012 05:24
write-multipart-mime
#!/usr/bin/python2
# largely taken from python examples
# http://docs.python.org/library/email-examples.html
import os
import sys
import smtplib
# For guessing MIME type based on file name extension
import mimetypes
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/inotify.h>
#include <linux/fcntl.h>
/**
* AVL hashmap
*
* This is used to map file descriptors from
**/
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
/**
* AVL hashmap
*
* This is used to map file descriptors from
**/
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
static Map<Long,RouteTable> calc_all_routes(Logger log, Graph graph)
{
// Initialize a new routing tables
Map<Long,RouteTable> new_tbl = new Hashtable<>();
Map<String, PathFinder> paths = new Hashtable<>();
for (String s : graph.vertices()) {
paths.put(s, new PathFinder(graph, s));
#!/bin/bash
dev=/dev/disk/by-partlabel/$(hostname -s)-crypt-root
key=/boot/key
grubcfg=/boot/grub/grub.cfg
usage() {
local arg0=$(basename "$0")
cat <<-EOF
usage $arg0 add|rm [dev]
/net
└── switches
└── switch1
├── flows
│   └── f1
│   ├── action.ip_dst
│   ├── action.ip_proto
│   ├── action.ip_src
│   ├── action.mac_dst
│   ├── action.mac_src