Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark mpictor

  • Austin, TX
View GitHub Profile
@mpictor
mpictor / Interface_EntityCluster.E.cxx
Created Jun 18, 2011
Pre-processed source from OCE; EKOPath has a floating point exception
View Interface_EntityCluster.E.cxx
//simplified with delta, delta.tigris.org - thanks C. Bergström!
class Standard_Transient {};
class Handle_Standard_Transient {
public:
Handle_Standard_Transient(): entity(((Standard_Transient *)0xfefdfefdfefd0000)){}
Handle_Standard_Transient& operator=(const Handle_Standard_Transient& aHandle){}
Standard_Transient *entity;
};
@mpictor
mpictor / spaces_in_fct.exp
Created Jul 29, 2011
express schema that exposes fedex_plus bug
View spaces_in_fct.exp
SCHEMA SPACES_IN_FUNCTION;
TYPE label = STRING; END_TYPE;
TYPE identifier = STRING; END_TYPE;
TYPE text = STRING; END_TYPE;
TYPE transformation = STRING; END_TYPE;
TYPE rigid_placement = STRING; END_TYPE;
TYPE dimension_count = INTEGER; END_TYPE;
TYPE compound_item_definition = STRING; END_TYPE;
TYPE founded_item_select = STRING; END_TYPE;
TYPE id_attribute_select = STRING; END_TYPE;
@mpictor
mpictor / test_schema.exp
Created Sep 8, 2011
Small schema with "Query expression source must be an aggregate" error
View test_schema.exp
-- $ ../bin/fedex_plus ../../data/test_schema.exp
-- ../../data/test_schema.exp:34: --ERROR: Query expression source must be an aggregate.
-- Errors in input
SCHEMA test_schema;
ENTITY representation_item
SUPERTYPE OF (ONEOF (binary_representation_item, compound_representation_item));
name : label;
--WHERE
@mpictor
mpictor / doxyassist.xml
Created Oct 1, 2011
doxyassist file for StepClassLibrary - subprojects don't show up in main project
View doxyassist.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- run doxyassist from scl root dir:
../doxyassist/doxyassist.py doc/doxyassist.xml -->
<!-- The main tag provides the version (1.0 only for now). The type attribute
is not required, and defaults to "generic". To use a different project handler,
change its type. The "name" attribute defines the name of your configuration.
Note: you must define and use the "http://simply-life.net/doxyassist/project.xsd"
namespace for the XML file to be processed properly. -->
<DoxyAssist xmlns="http://simply-life.net/doxyassist/doxyassist.xsd"
@mpictor
mpictor / CMakeLists.txt
Created Oct 21, 2011
Cmake and ctest scripts demonstrating build targets that are also test targets. CMakeLists is rather complicated because it generates source code from targets in a list.
View CMakeLists.txt
#https://github.com/mpictor/StepClassLibrary/blob/master/data/CMakeLists.txt
#this sets a property so that the target doesn't get built by 'make' or 'make all'
#useful when testing generation of schema code/compiling schem libs/etc
FUNCTION( TESTABLE_TARGET target )
if(ENABLE_TESTING)
set_target_properties( ${target} PROPERTIES EXCLUDE_FROM_ALL ON )
endif()
ENDFUNCTION( TESTABLE_TARGET )
@mpictor
mpictor / parser-output.txt
Created Nov 5, 2011
Return type or local variable requires type label
View parser-output.txt
# parser output for line 94 of file below
# $ ../bin/fedex_plus -d9 -l94 -u94 ../../test/test_generics_type_label.exp
Schema line number: 94
Next token is token TOK_IDENTIFIER ()
Shifting token TOK_IDENTIFIER ()
Entering state 117
Reducing stack by rule 147 (line 1135):
$1 = token TOK_IDENTIFIER ()
-> $$ = nterm id_list ()
@mpictor
mpictor / gist:1967483
Created Mar 3, 2012
part 21 encode/decode binary
View gist:1967483
//my version of http://groovyconsole.appspot.com/script/646001
def in_bin = ["0", "1", "111011", "100100101010", "001101", "01000" ]
def p21_rep = [] //in_bin encoded in part 21 format
def d = [] //extra binary digits in p21_rep
def hex = [] //hex part of p21_rep
def nibbles = [] //number of hex digits
def out_bin = [] //p21_rep decoded
def num_bits = [] //number of used bits
def zeros = [] //number of binary zeros to prepend to out_bin
def padded = [] //num_bits + d
@mpictor
mpictor / CMakeLists.txt
Last active Jan 4, 2016
cmake generates invalid Makefile
View CMakeLists.txt
# ----- GENERATED FILE -----
# ----- Do not edit! -----
# schema name: index_attribute
# (short name: index_attribute)
# contains 5 entities, 1 types
PROJECT( index_attribute)
# list headers so they can be installed - entity, type, misc
set( index_attribute_entity_hdrs
@mpictor
mpictor / hang.md
Last active Jul 30, 2018
4.17.6: "smartpqi 0000:b1:00.0: resetting scsi 0:1:0:0" (mke2fs hangs)
View hang.md

kernel version: 4.17.6 (similar failures with 4.14.28, 4.14.53)

kernel config: file below

hardware: HP ProLiant DL360 Gen10

firmware: UEFI (Note: issue not encountered with legacy boot)

In dmesg, these two lines jump out at me (line 1160-1161):

@mpictor
mpictor / default.xml
Created Jan 7, 2019
libvirt missing ip
View default.xml
<network>
<name>default</name>
<uuid>8c76bca7-e7a6-4f29-8e6c-241d6f616141</uuid>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='virbr0' stp='off' delay='0'/>
<mac address='52:54:00:e0:18:a8'/>