Skip to content

Instantly share code, notes, and snippets.

View L422Y's full-sized avatar
🤓

Larry Williamson L422Y

🤓
View GitHub Profile
@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 / 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 / !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 / 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 / osx_automount_nfs.md
Last active May 4, 2024 14:26
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

LARRY A. WILLIAMSON LARRY.A.WILLIAMSON@GMAIL.COM 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 / asana__project__colors.md
Last active December 25, 2015 07:49
Asana Project color enhancements for Chrome

Chrome: Asana Project Colors -- Colorize your "My Tasks" view in Asana based on the project colors, only works when sorted by Project.

This is a Tampermonkey userscript.

@L422Y
L422Y / vhosts.conf
Created October 3, 2013 03:08
boxen / brew nginx development configuration w/ fastcgi php-fpm
server {
set $work_folder /work;
listen 80;
index index.php index.html index.htm;
server_name ~^(.*)\.dev$;
if (-d /work/$1/) {
set $path $work_folder/$1;
}
@L422Y
L422Y / enformer.md
Last active December 24, 2015 03:39
a test form for enformer, a framework for easily building forms and plugging results into an api

screenshot

@L422Y
L422Y / gist:6416624
Last active December 22, 2015 04:19 — forked from fredkelly/gist:3655228
homebrew install of ffmpeg w/ web video encoders
brew install ffmpeg --with-theora --with-libogg --with-libvorbis --with-libvpx