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):
| # | |
| # the following one liner creates a shell variable from every parameter in a | |
| # the query string in the variable QUERY, of the form p1=v1&p2=v2,... and sets it to | |
| # the corresponding value so that parameters can be accessed by its name $p1, $p2, ... | |
| # | |
| for p in ${QUERY//&/ };do kvp=( ${p/=/ } ); k=${kvp[0]};v=${kvp[1]};eval $k=$v;done |
| #!/bin/bash | |
| # -------------------------------------------------------------------------------------------- | |
| # Installs Ruby using rbenv/ruby-build on the Raspberry Pi (Raspbian) | |
| # | |
| # Run from the web: | |
| # bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh) | |
| # -------------------------------------------------------------------------------------------- | |
| # Set the Ruby version you want to install |
I have spent quite a bit of time figuring out automounts of NFS shares in OS X...
Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:
/etc/auto_master (see last line):
#
# Automounter master map
#
+auto_master # Use directory service
| set curVolume to get volume settings | |
| if output muted of curVolume is false then | |
| set volume with output muted | |
| else | |
| set volume without output muted | |
| end if |
| #!/bin/sh | |
| # This is a skeleton of a bash daemon. To use for yourself, just set the | |
| # daemonName variable and then enter in the commands to run in the doCommands | |
| # function. Modify the variables just below to fit your preference. | |
| daemonName="DAEMON-NAME" | |
| pidDir="." | |
| pidFile="$pidDir/$daemonName.pid" |
| #!/bin/sh | |
| echo -n '{' | |
| # memory as "mem": { "current": 800, "total": 1024, "load", 82 } where amount is in MB and load in % | |
| free -m | awk 'NR==2{printf "\"mem\": { \"current\":%d, \"total\":%d, \"load\": %.2f }", $3,$2,$3*100/$2 }' | |
| echo -n ',' | |
| # diska as "disk": { "current": 6, "total": 40, "used": 19 } where amount is in GB and used in % | |
| df -h | awk '$NF=="/"{printf "\"disk\": { \"current\":%d, \"total\":%d, \"used\": %d }", $3,$2,$5}' |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # Python script to find the largest files in a git repository. | |
| # The general method is based on the script in this blog post: | |
| # http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
| # | |
| # The above script worked for me, but was very slow on my 11GB repository. This version has a bunch | |
| # of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects. | |
| # |
I started using FreeNAS in August 2013. It is fantastic piece of software and I have been really impressed by the upgrades just in the few months I've been using it. It looks like they recently went to a plugin system as of version 9 to make installing software easier for end users. I've ran into several issues related to plugins and user + group permissions so I decided to just use the available FreeBSD port system. After fiddling for a few days (now turned into months) I believe I have created something helpful for the community and anyone interested in picking up the port system. The sandbox nature of FreeNAS's jail system is especially helpful for playing around without having any consequence on your core system.
Here are straight-forward instructions to setting up a bunch of different software on FreeNAS. If you make a terrible error, just throw up another plugin sandbox and repeat.