Skip to content

Instantly share code, notes, and snippets.

View metacollin's full-sized avatar

metacollin metacollin

View GitHub Profile
@metacollin
metacollin / tables.md
Last active April 14, 2023 12:55 — forked from mokagio/tables.md
How to do tables in GitHub flavoured Markdown

This:

heading 1 | heading 2 | heading 3
--- | --- | ---
abc | bcd | cde
def | efg | fgh

becomes this:

@metacollin
metacollin / SSDT-CPU-DEVICE-WRAPPER.dsl
Created June 9, 2022 09:48
Wraps CPU device objects in Processor objects so macOS can boot - this is for dual socket systems only, and is only needed if you hang during ACPI table loading
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20200925 (64-bit version)
* Copyright (c) 2000 - 2020 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of iASLKSbCIa.aml, Thu Jun 9 03:46:08 2022
*
* Original Table Header:
def cream_of_tawrtawr(final_volume, final_iso_concentration, starting_iso_concentration)
iso_volume = (final_iso_concentration * (final_volume*0.9))/starting_iso_concentration
water_volume = final_volume - iso_volume
benzaklonium_volume = final_volume*0.1
end
#!/bin/bash
# Script to instruct the Mac how to route packets to the
# software defined network where containers created via boot2docker
# reside. This lets you casually directly to ports (ssh, http, etc. etc.)
# on those containers.
#
function ohfk(){ echo "FUCK: $*" ; }
function ohno(){ echo "FAILING: $*" ; exit 1; }
[ ! -z "$1" ] && DOCKER_MACHINE_ID="$1" || DOCKER_MACHINE_ID="default"
diff -ur a/src/osx/carbon/dataobj.cpp b/src/osx/carbon/dataobj.cpp
--- a/src/osx/carbon/dataobj.cpp 2014-06-24 15:43:01.000000000 -0600
+++ b/src/osx/carbon/dataobj.cpp 2019-02-12 13:43:04.000000000 -0700
@@ -29,9 +29,9 @@
#include "wx/osx/private.h"
-#if wxOSX_USE_COCOA_OR_CARBON
- #include <QuickTime/QuickTime.h>
-#endif
#include <iostream>
class myGeneric
{
public:
myGeneric()
{
};
index 3e0ebbf6ec..7a8132a221 100644
--- a/dlls/winemac.drv/keyboard.c
+++ b/dlls/winemac.drv/keyboard.c
@@ -238,14 +238,14 @@ static const struct {
{ VK_BACK, 0x0E, TRUE }, /* kVK_Delete */
{ 0, 0, FALSE }, /* 0x34 unused */
{ VK_ESCAPE, 0x01, TRUE }, /* kVK_Escape */
- { VK_RMENU, 0x38 | 0x100, TRUE }, /* kVK_RightCommand */
- { VK_LMENU, 0x38, TRUE }, /* kVK_Command */
+ { VK_RWIN, 0x5C | 0x100, TRUE }, /* kVK_RightCommand */ //was VK_RMENU, 0x38 | 0x100
@metacollin
metacollin / mv_regex.sh
Last active February 4, 2018 14:22
A quick, dirty, and likely dangerous bash function to rename files using a find-replace style regex with capture groups referenced as such: \1 \2 \3...n
# source this file or copy and paste it into your ~/.bash_profile
function mv_regex()
{
regex="$1"
replace="$2"
FILE_LIST=()
NEW_NAMES=()
files="*"
@metacollin
metacollin / Polycarbonate.ini
Last active May 6, 2024 10:17
Slic3r settings for high quality, low-warp, high-strength printing of polycarbonate without an enclosure on a Prusa i3 MK2S
# generated by Slic3r 1.37.2-prusa3d on Thu Dec 7 09:48:20 2017
# Figured out by trial and error engineer metacollin
# Released as public domain.
# USE GLUESTICK FOR PRINT BED ADHESION
avoid_crossing_perimeters = 0
bed_shape = 0x0,250x0,250x210,0x210
bed_temperature = 110
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\n\n
bottom_solid_layers = 8
bridge_acceleration = 1000
diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp
index da0a10743..76ffcc9f6 100644
--- a/kicad/kicad.cpp
+++ b/kicad/kicad.cpp
@@ -173,7 +173,7 @@ void PGM_KICAD::MacOpenFile( const wxString& aFileName )
KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) App().GetTopWindow();
- if( !aFileName.empty && wxFileExists( aFileName ) )
+ if( !aFileName.empty() && wxFileExists( aFileName ) )