Skip to content

Instantly share code, notes, and snippets.

View walesmd's full-sized avatar

Michael Wales walesmd

View GitHub Profile

Keybase proof

I hereby claim:

  • I am walesmd on github.
  • I am walesmd ( on keybase.
  • I have a public key whose fingerprint is B810 4894 0842 8ED7 C155 9765 6F76 BD21 17ED 0D34

To claim this, I am signing this object:

walesmd / example1.js
Created November 7, 2014 23:00
Fun Friday Challenge: Why do these two code examples work differently?
/* This example results in
* undefined is not a function
var doLog = function() {
walesmd / hoisting.js
Created September 21, 2014 00:31
The differences between JavaScript function declarations and function expressions (and why variable hoisting is the reason for these differences).
// JavaScript code is run in two passes, the first pass
// does all the function declarations and determines the
// variables. The second pass actually executes your code.
// Example 1: Function Declaration
// Function declarations will always work because
// declarations are determined on the first pass and when
// you actually call the function is performed on the
// second pass.
walesmd /
Last active December 13, 2023 05:06
A lot of people are having issues with Since this is a very new issue, Google was no help and `man iconservicesd` is even more hilarious. I eventually fixed it, when I was working on a completely different issue (that is still not fixed). The instructions are below and on the Apple Support Forum, https://discussions.…

I was chasing down another issue (slow "Save As") and thought these two issues may have been related (with QuickLook being the common broken link). Unfortunately, my "Save As" dialog is still miserably slow on the initial load; but IconServicesAgent hasn't gone above 30MB and he rarely makes an appearance in the Console!

Some of these steps may not be necessary, but here are all of the steps I took that inadverdently put IconServicesAgent back in its place. Note: all commands are a single-line, if they appear to be multiple that's just the forum formatting.

  1. Check for any QuickLooks related .plist files. In a terminal: mdfind -name .plist

  2. I only had files at the system level (specifically within /System/Library/LaunchAgents/). If you have others, modify the directions below to take that into account (re-introducing plist files from the system level back up to the user).

  3. Make some temporary directories to store these plist files, just in case: mkdir ~/tmp-quicklook

# Command Line Search Utility
# Michael Wales,
# A very basic bash function that quickly searches
# Examples:
# caniuse
# caniuse border-radius
# caniuse "alpha transparency" counters "canvas drawings" html svg
walesmd / map.geojson
Created August 14, 2013 01:38
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
walesmd / correct.json
Created August 14, 2013 01:31
Correct JSON-API Example Our response consists of a single array with the same name as our table. Notice this is using the ID format in that foreign keys return the primary key to the joined table. A URL format is available and preferred, so that the client can be completely unaware / agnostic in regards to the backend. In ID format, we must har…
"datacenters": [{
"id": "1",
"name": "Albany Center",
"lat": "42.64957",
"lng": "-73.77459",
"city": "Albany",
"state": "NY",
"zip": "12208",
"createdAt": "2013-06-24",
walesmd / map.geojson
Last active February 19, 2018 12:49
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
walesmd / index.html
Created August 8, 2013 09:18
<!DOCTYPE html>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
walesmd / mariadb.repo
Created May 31, 2013 19:41
wget [this_gist] -O /etc/yum.repo.d/mariadb.repo
# MariaDB 10.0 CentOS repository list - created 2013-05-31 19:29 UTC
name = MariaDB
baseurl =