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):
#!/bin/bash | |
MouseIdentifierString="Mouse" | |
writeOpts() { | |
sudo cat <<'EOF' | sudo tee -a /var/lib/bluetooth/$1/$2/info | |
[ConnectionParameters] | |
MinInterval=6 | |
MaxInterval=7 | |
Latency=0 |
spellChecking = true | |
spellingLanguage = 'en' | |
softTabs = true | |
softWrap = false | |
invisiblesMap = "~ \t┊" | |
TM_STRIP_WHITESPACE_ON_SAVE = true | |
TM_GIT = "/usr/local/bin/git" | |
TM_RUBY = "/usr/local/var/rbenv/shims/ruby" |
Add to /boot/loader.conf: | |
ng_ubt_load="YES" | |
Add to /etc/rc.conf: | |
hcsecd_enable="YES" | |
sdpd_enable="YES" | |
bthidd_enable="YES" | |
Reboot, or run: |
It sometimes happen you need change code on a machine from which you cannot push to the repo.
You’re ready to copy/paste what diff
outputs to your local working copy.
You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:
1. Generate the patch:
git diff > some-changes.patch
Rails.application.routes.draw do | |
get '/(:locale)/products/(:category)/(page/:page).:extension', | |
:to => 'products#index', | |
:as => :products, | |
:constraints => { | |
:locale => /[a-z]{2}/, | |
:category => /.+?/, | |
:page => /\d+/ | |
}, |
#1===========First code================ | |
#!/usr/bin/env ruby | |
databases = { | |
:local_db => { | |
:database => 'my_db', | |
:username => 'root', | |
:password => 'admin', | |
:host => 'localhost' |