Skip to content

Instantly share code, notes, and snippets.

View L422Y's full-sized avatar
🤓

Larry Williamson L422Y

🤓
View GitHub Profile

LARRY A. WILLIAMSON [email protected] CREATIVE TECHNOLOGIST NEW YORK, NEW YORK


Coding Design Networking Miscellaneous OS/DB
HTML, CSS 2 & 3 AfterEffects Routing Embedded Devices Windows
Javascript/AJAX Photoshop SMTP/POP3/IMAP PointGrey & uEye SDKs OSX
PHP Illustrator Load Balancing Serial Communication Linux
.NET Framework Flash, AS3 VPNs (PPTP/IPSEC) Motion Tracking MongoDB
@L422Y
L422Y / osx_automount_nfs.md
Last active May 11, 2025 19:36
Automounting NFS share in OS X into /Volumes

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

@L422Y
L422Y / update_airmail_beta.py
Created February 14, 2014 05:44
AirMail Beta Automatic Updater Script
#!/usr/bin/python
import re,urllib2,urllib
import subprocess, shutil
try:
f = open('/Applications/AirMail Beta.app/Contents/Info.plist','r')
plist = f.read();
# <key>CFBundleVersion</key\>.*
my_bundlever = re.findall('CFBundleVersion.*\n.*\<string\>(\d*)\</string\>',plist)[0]
@L422Y
L422Y / !README.md
Last active June 1, 2023 17:08
Dynamic, Responsive font-sizes and spacing using em units and JavaScript

Dynamic responsive font-sizing is something I see missing on many “responsive” websites. Breakpoints are nice but I have better things to do with my time than defining infinite font-size adjustments. (so do you!)

To implement this, we’re going to take advantage of the em font sizing unit in CSS.

Click here to see what I'm talking about: codepen.io/lawrencealan/full/eJqlu

Text sizing using the em unit

A single em is equal to the current font-size of the closest parent which has a font-size set.

@L422Y
L422Y / osx_versions.js
Last active August 29, 2015 14:12
Javascript Map object: OSX Release IDs to OSX Versions
// use the major version from data.kern.osversion in sysctl output
var osxversions = {
"14": "Yosemite",
"13": "Mavericks",
"12": "Mountain Lion",
"11": "Lion",
"10": "Snow Leopard",
"9": "Leopard",
"8": "Tiger",
@L422Y
L422Y / notes.md
Created December 2, 2015 22:25 — forked from JedWatson/notes.md
Notes on how to create a new field type for Keystone

Creating new Field Types for KeystoneJS

We're currently working on making it easier to add new field types to KeystoneJS as plugins.

In the meantime, if you'd like to work on your own field type, hopefully this guide will point you in the right direction.

Keystone fields require the following:

  • a {fieldType}.js file in ./lib/fieldTypes that controls the field and encapsulates options support, underscore functions, validation and updating
  • the {fieldType}.js file needs to be included by ./lib/fieldTypes/index.js
@L422Y
L422Y / unlocker.applescript
Created July 20, 2018 00:13
Tool to delete InDesign and InCopy lock files
set dir to ""
on open dropped_dir
set dir to dropped_dir
end open
if length of dir is equal to 0 then
set dir to (choose folder with prompt "Choose a folder to scan for lock files")
end if
set list_of_files to {}
@L422Y
L422Y / update-stage.sh
Last active November 8, 2018 03:10
Script to automate updating a staged WordPress site from a local dev environment and clear caches
#!/bin/bash
#
# Author: Larry Williamson - [email protected]
# Script to automate updating a staged WordPress site from a local dev environment and clear PageSpeed
# and NGiNX fastcgi caches. Skips uploading node_modules.
#
# 1) Update WordPress (Understrap) version in style.css so browsers will refresh the new version
# 2) use lftp w/ sftp to reverse mirror files w/ 20 parallel connections (FAST.)
# 3) use SSH to remotely execute a cache clearing script
@L422Y
L422Y / dequeue-cf7.php
Created December 13, 2018 18:05
Dequeue Contact Forms 7 scripts and reCaptcha from WordPress pages without forms
// career posts and the page w/ ID 13 both have forms,
// as long as we are not on one of those, we
// dequeue CF7 and reCaptcha to remove the v3 badge
// add to functions.php
add_action('wp_print_scripts', function () {
global $post;
$is_career = (is_single() && $post->post_type == 'career');
if (!$is_career && !is_page(array('13'))) {
// adapted from https://stackoverflow.com/a/61121577/887164
// replace `adsbygoogle` in your ad unit class name with `ADSENSE`
let _rsztmr;
// call to updateAds after resize (debounced)
window.onresize = function () {
clearTimeout(_rsztmr);
_rsztmr = setTimeout(updateAds, 100);
}