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):
| // https://www.mongodb.com/blog/post/quick-start-golang-mongodb-starting-and-setup | |
| func main() { | |
| client, err := mongo.NewClient(options.Client().ApplyURI("<ATLAS_URI_HERE>")) | |
| if err != nil { | |
| log.Fatal(err) | |
| } | |
| ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) | |
| err = client.Connect(ctx) | |
| if err != nil { | |
| log.Fatal(err) |
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| ) | |
| func main() { | |
| //https://golang.org/doc/effective_go#for |
| #!/bin/bash | |
| # Assumes brew and python are installed | |
| brew install qt@6 llvm cmake ninja git | |
| # Setup environment | |
| mkdir -p ~/.pyqt6; cd ~/.pyqt6 | |
| curl https://files.pythonhosted.org/packages/a0/07/0ae4f67768c1150af851572fae287aeaf956ed91b3b650b888a856274ae4/PyQt6-6.1.1.tar.gz --output PyQt6-6.1.1.tar.gz | |
| curl https://files.pythonhosted.org/packages/50/24/743c4dd6a93d25570186a7940c4f072db1cf3fa919169b0ba598fcfc820a/PyQt6_sip-13.1.0.tar.gz --output PyQt6_sip-13.1.0.tar.gz | |
| curl https://files.pythonhosted.org/packages/ea/5e/4c954451984d00dfc051eab5c4b40453923a85f5a0dfa9678511d06eec5e/PyQt6_3D-6.1.1.tar.gz --output PyQt6_3D-6.1.1.tar.gz | |
| curl https://files.pythonhosted.org/packages/b9/ac/9c545186f3125b0fb02359938bddde0167344f3d4e14aee17fa122b5287a/PyQt6_Charts-6.1.1.tar.gz --output PyQt6_Charts-6.1.1.tar.gz |
| import heapq | |
| # https://justkode.kr/algorithm/python-dijkstra | |
| def dijkstra(graph: dict, start: int) -> dict: | |
| distances = {node: float('inf') for node in graph} | |
| distances[start] = 0 | |
| queue = [] | |
| heapq.heappush(queue, [distances[start], start]) |
| def fast_pow(n: int, k: int, mod: int) -> int: | |
| """ | |
| faster power that uses Divide & Conquer | |
| :param n: base | |
| :param k: count | |
| :param mod: modular | |
| :return: powered n to k | |
| """ | |
| if n == 0: | |
| raise ArithmeticError("n can't be 0") |
| def karatsuba(x: int, y: int) -> int: | |
| # get Length of variable | |
| x_str, y_str = str(x), str(y) | |
| x_len, y_len = len(x_str), len(y_str) | |
| # Initialize | |
| if x_len == 1 or y_len == 1: | |
| return x * y | |
| # Divide |
| #include<stdio.h> | |
| int main(void) | |
| { | |
| printf("Hello,World\n"); | |
| return 0; | |
| } |