This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import string | |
def is_yes(prompt="", default=True): | |
"""Ask user to enter Y or N in response to a prompt. | |
returns True if answer is Y, Falseif N or default if answer is empty""" | |
if default: | |
prompt += " [Y/n]" | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Build library with : gcc -o ba.so -fPIC -shared ba.c | |
#include <string.h> | |
#include <stdio.h> | |
static unsigned char buf[100]; | |
static size_t blen = 0; | |
int write(const char *pc, size_t len) | |
{ | |
if (len > 100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
General CAN functions using Kvaser canlib | |
""" | |
from __future__ import print_function | |
import logging | |
from sys import exit | |
# kvaser canlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""KeyedList : A list that can also be accessed using a (string) key like a dict | |
A mutable alternative to namedtuple, yet a lot simpler than the full featured 'namedlist' class | |
Intended for use like a C struct with writeable fields | |
""" | |
class KeyedList(list): | |
"""A list that can also be accessed using a (string) key like a dict. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /home/eliot/src/jack/jack-1.9.9.5/wscript | |
+++ /home/eliot/src/jack/wscript | |
@@ -115,7 +115,7 @@ | |
#if conf.env['IS_SUN']: | |
# conf.check_tool('compiler_cxx') | |
# conf.check_tool('compiler_cc') | |
- | |
+ | |
conf.env.append_unique('CXXFLAGS', '-Wall') | |
conf.env.append_unique('CFLAGS', '-Wall') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Wireshark dissector for CobraNet protocol (ethertype == 0x8819) | |
-- Note that this is incomplete. Shows PDU type and version, plus | |
-- some known fields from Reservation PDU | |
-- | |
-- Eliot Blennerhassett <[email protected]> | |
do | |
-- Create a new dissector | |
COBRANET = Proto ("cobranet", "CobraNet") | |
local cobranet_ethertype = 0x8819 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
'''Read fully linked TI COFF file, and generate AIS format file | |
Commandline parameters | |
enable sequential read, | |
pll and emifb configuration | |
pinmux configuration | |
enable checksums | |
'Eliot Blennerhassett' <[email protected]> |