Skip to content

Instantly share code, notes, and snippets.

View metacollin's full-sized avatar

metacollin metacollin

View GitHub Profile
@@ -45,7 +45,7 @@ CFLAGS += -g -std=gnu99 $(CFLAGS_GTK) -DCPP='"cpp"' \
SLOPPY = -Wno-unused -Wno-implicit-function-declaration \
-Wno-missing-prototypes -Wno-missing-declarations
LDFLAGS +=
-LDLIBS = -lm -lfl $(LIBS_GTK)
+LDLIBS = -lm -ll $(LIBS_GTK)
YACC = bison -y
YYFLAGS = -v
diff --git a/delete.c b/delete.c
index 7128f9e..75d7476 100644
--- a/delete.c
+++ b/delete.c
@@ -684,8 +684,11 @@ static int undelete_one(void)
return 1;
}
-
+#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
#!/bin/bash
cd kicad.app/Contents/Frameworks
for file in *.dylib; do fixup_libs=($(otool -L $file | grep -o "@executable_path.*.dylib")); libs=($(echo ${fixup_libs[@]} | grep -o "[^/]*dylib")); for ((i=0;i<${#fixup_libs[@]};++i)); do install_name_tool -change "${fixup_libs[i]}" "@rpath/${libs[i]}" $file; done; done;
for file in *.dylib; do install_name_tool -add_rpath @loader_path/../.. -add_rpath @executable_path/../Frameworks $file; done
cd python/site-packages
fixup_libs=($(otool -L _pcbnew.so | grep -o "@loader_path.*.dylib")); libs=($(echo ${fixup_libs[@]} | grep -o "[^/]*dylib")); for ((i=0;i<${#fixup_libs[@]};++i)); do install_name_tool -change "${fixup_libs[i]}" "@loader_path/../../${libs[i]}" _pcbnew.so; done;
install_name_tool -add_rpath @loader_path/../.. -add_rpath @executable_path/../Frameworks _pcbnew.so
@metacollin
metacollin / ltspice.md
Last active April 30, 2022 10:28
LTSpice color scheme - Twilight After Dawn

screenshot

LTSpice color scheme - Twilight After Dawn

                |  R    |  G    |  B    |
Wires           |  138  |  154  |  149  |
Junctions       |  152  |  205  |  255  |
Component body  |  207  |  106  |  76   |
Graphic Flag | 218 | 239 | 163 |
diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt
index 20769c6a4..b2ca04545 100644
--- a/pcbnew/CMakeLists.txt
+++ b/pcbnew/CMakeLists.txt
@@ -765,31 +765,31 @@ if( KICAD_SCRIPTING_MODULES )
# put everything into bundle at build time, it is relocated at install
add_custom_target( ScriptingModulesPcbnewSoCopy ALL
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
- DEPENDS _pcbnew
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.so
diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt
index 20769c6a4..d81418deb 100644
--- a/pcbnew/CMakeLists.txt
+++ b/pcbnew/CMakeLists.txt
@@ -765,7 +765,7 @@ if( KICAD_SCRIPTING_MODULES )
# put everything into bundle at build time, it is relocated at install
add_custom_target( ScriptingModulesPcbnewSoCopy ALL
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
- DEPENDS _pcbnew
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.so
--- a/common/tool/tool_manager.cpp
+++ b/common/tool/tool_manager.cpp
@@ -532,11 +532,11 @@
if( st->cofunc )
st->Push();
+ st->cofunc = new COROUTINE<int, const TOOL_EVENT&>( tr.second );
+
// as the state changes, the transition table has to be set up again
st->transitions.clear();
remove_norenumber = (l, i) ->
not_named_i = (x) ->
if x.name?
x.name != i
else if x.xname?
x.xname != i
else
true
filter l, not_named_i
center_x = size_x/2.0
#include <string>
#include <iostream>
#include <pegtl.hh>
namespace asl
{
//FUCK THIS SHIT
struct la;
@metacollin
metacollin / dsdt.asl
Created November 1, 2016 00:20
Supermicro X10DAi DSDT
This file has been truncated, but you can view the full file.
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20160527-64
* Copyright (c) 2000 - 2016 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of iASLhMXeKg.aml, Mon Oct 31 18:19:28 2016
*
* Original Table Header: