Skip to content

Instantly share code, notes, and snippets.

Avatar

metacollin metacollin

View GitHub Profile
View fixup_python.sh
#!/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 Apr 30, 2022
LTSpice color scheme - Twilight After Dawn
View ltspice.md

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 |
View kicad_macOS_python_fix.patch
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
View bane_of_xzcvczxs_existance.patch
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
View boost-1.61.patch
--- 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();
View awful.coffee
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
View fuck.cpp
#include <string>
#include <iostream>
#include <pegtl.hh>
namespace asl
{
//FUCK THIS SHIT
struct la;
@metacollin
metacollin / dsdt.asl
Created Nov 1, 2016
Supermicro X10DAi DSDT
View dsdt.asl
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
*
@metacollin
metacollin / dsdt.asl
Created Nov 1, 2016
Supermicro X10DAi DSDT
View dsdt.asl
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
*
View wxwidgets-3.0.2_macosx_sierra.patch
diff --git src/osx/carbon/dataobj.cpp src/osx/carbon/dataobj.cpp
index c03c6a1..c40c1ce 100644
--- src/osx/carbon/dataobj.cpp
+++ src/osx/carbon/dataobj.cpp
@@ -30,8 +30,10 @@
#include "wx/osx/private.h"
#if wxOSX_USE_COCOA_OR_CARBON
+#ifndef __MAC_10_12
#include <QuickTime/QuickTime.h>