A script to fix EDID problems on external monitors in macOS.
-
Connect only the problem display.
-
Create this directory structure (if it doesn't already exist):
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
assert(_VERSION == "Lua 5.3") | |
-- DDS header [32] | |
_fourcc = 1; _size = 2; _flags = 3; _height = 4 | |
_width = 5; _pitch = 6; _depth = 7; _mipmaps = 8 | |
-- reserved [44] | |
-- 9 10 11 12 | |
-- 13 14 15 16 | |
-- 17 18 19 | |
-- DDSPixelFormat [32] |
/*--- checkForBadJavascripts() | |
This is a utility function, meant to be used inside a Greasemonkey script that | |
has the "@run-at document-start" directive set. | |
It Checks for and deletes or replaces specific <script> tags. | |
*/ | |
function checkForBadJavascripts (controlArray) { | |
/*--- Note that this is a self-initializing function. The controlArray | |
parameter is only active for the FIRST call. After that, it is an | |
event listener. |
$OutputEncoding = New-Object -TypeName System.Text.UTF8encoding |
<?xml version="1.0" encoding="utf-8" ?> | |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- 20110224 : Ryan Milligan : Created OverrideAppConfigWithTargetPath target to fix ClickOnce deploy bug --> | |
<!-- 20100827 : João Angelo : Fixed bug when using Publish command within Visual Studio --> | |
<PropertyGroup> | |
<!-- Prevent circular dependency on Build target --> | |
<PipelineDependsOnBuild>false</PipelineDependsOnBuild> | |
<!-- Override project config file name (By default is set to Web.config) --> | |
<ProjectConfigFileName>App.Config</ProjectConfigFileName> | |
</PropertyGroup> |
For the proper source, and other examples, please see the original gist.