Fix casks with `depends_on` that reference pre-Mavericks

If you get an error like Error: Cask 'hex-fiend-beta' definition is invalid: invalid 'depends_on macos' value: ":lion", where hex-fiend-beta can be any cask name and :lion any macOS release name, run the following command: /usr/bin/find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.rb' -print0 | /usr/bin/xargs -0 /usr/bin/perl -i -pe 's/depends_on macos: \[.*?\]//gsm;s/depends_on macos: .*//g' This strips out all depends_on macos references from installed casks. It’s a blunt instrument – you’re editing Homebrew’s metadata files directly – but it gets things working again. ...

'Decoding the Error: StatusCode=0 "ReferencedResourceNotProvisioned" in Azure'

Introduction If you’re working with Azure, you might have seen an error like this: “Failure sending request: StatusCode=0 — Original Error: Code=‘ReferencedResourceNotProvisioned’ Message=‘Cannot proceed with operation because resource used by resource is not in Succeeded state. Resource is in Updating state and the last operation that updated/is updating the resource is PutSubnetOperation.’” It looks worse than it is. Here’s what it means and how to fix it. Why Does This Error Occur? A related resource is stuck in an ‘Updating’ state, so Azure won’t let the operation proceed. This usually means another operation is still running on that resource or one it depends on. ...

Fixing "RPC failed; HTTP 413 curl 22" in Nginx

You get this when you try to push a large commit over HTTP and Nginx decides your request is too big: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large The fix is adding one line to your Nginx config. Open /etc/nginx/nginx.conf and find the http, server, or location block you want to change, then add: client_max_body_size 50m; The 50m is 50 megabytes. Change it if you need more or less. Then reload Nginx: ...

'scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory'

sudo apt-get install -y libssl-dev

'/bin/sh: 1: bison: not found'

sudo apt-get install bison

'[solved] xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist'

Error: xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist Use sudo xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install to install the standalone command line developer tools. See man xcode-select for more details. xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist Use sudo xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install to install the standalone command line developer tools. See man xcode-select for more details. ...

puppet "could not find class in namespace" — it's probably a missing brace

Got this from Puppet? err: Could not retrieve catalogue: Could not find class php in namespaces standardbuild at /etc/puppet/manifests/templates.pp:15 on domain.internal.com The error points at a missing class, but the real culprit is often a missing closing brace somewhere above that line. Puppet’s parser gets confused and reports the wrong thing. Check your manifests for unmatched { and }. A syntax highlighter helps — or just count your braces.

phpize failed? install the dev files

Hit phpize and got a “not found” error? You’re missing the PHP development package. sh: phpize: not found ERROR: `phpize' failed On Ubuntu or Debian, grab it with: sudo apt-get install php5-dev That’s it. phpize should work after that.