Skip to content

Instantly share code, notes, and snippets.

View smockle's full-sized avatar

Clay Miller smockle

View GitHub Profile
@smockle
smockle / VMwareFusion.md
Last active August 29, 2015 14:03
Key mappings for VMware Fusion. (Windows guests; Mac hosts)

Fusion Shortcuts

Uncheck ⌘-Q

Key Mappings

Mac Shortcut Virtual Machine Shortcut
⌘-Z Control-Z
⌘-X Control-X
@smockle
smockle / apt-keys.sh
Created September 6, 2014 20:35
Import GPG keys that apt-get says are missing.
sudo apt-get update 2> /tmp/keymissing; for key in $(grep "NO_PUBKEY" /tmp/keymissing |sed "s/.*NO_PUBKEY //"); do echo -e "\nProcessing key: $key"; sudo gpg --keyserver pgpkeys.mit.edu --recv $key && sudo gpg --export --armor $key | sudo apt-key add -; done
@smockle
smockle / ISC-Creative.txt
Created October 7, 2014 04:38
An adaptation of the ISC license, intended for use with creative works.
ISC-Based License For Creative Works
Copyright (c) 2014, Clay Miller <clay@smockle.com>
Permission to use, copy, modify, and/or distribute these creative works for any
purpose with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.
THESE CREATIVE WORKS ARE PROVIDED "AS IS" AND THE CREATOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THESE CREATIVE WORKS INCLUDING ALL IMPLIED WARRANTIES
@smockle
smockle / mail.js
Last active August 29, 2015 14:09
Amazon SES mail settings for Ghost's config.js
mail: {
from: process.env.SES_FROM_ADDRESS,
transport: 'SMTP',
host: process.env.SES_HOST,
options: {
service: 'SES',
from: process.env.SES_FROM_ADDRESS,
host: process.env.SES_HOST,
auth: {
user: process.env.SES_ACCESS_ID,
@smockle
smockle / smockle-roadmap.md
Last active August 29, 2015 14:09
Features for future Smockle rewrites.
  • Detect critical path CSS and insert in top of page
  • Lazy-load CSS
  • Lazy-load JavaScript
  • Modernizr for feature detection
  • Serve static assets from a CDN (e.g. S3 + Cloudfront)
  • Cache bust assets and rewrite references
  • Optimize images
  • Compile Sass
  • Prefetch DNS
  • Include touch icons and favicon
@smockle
smockle / promises.js
Created December 18, 2014 23:18
Chaining promises in JavaScript.
get("/api/google/sheets/resources")
.then(JSON.parse)
.then(function (context) {
return handlebar("#template", "#output", context);
})
.then(function (context) {
return pourover(context);
})
.then(function (view) {
return linkify(view);
@smockle
smockle / conferences.md
Last active August 29, 2015 14:15
Interesting web, mobile, design, ux and accessibility conferences in 2015 (US only)

##O’Reilly Fluent Conference 2015 Dates: 20th-22nd April
Location: San Francisco, CA
Ticket Price: $1245
Twitter Attending: 6

Put JavaScript, HTML5, CSS, & the latest web tools to work. Fluent is for everyone who has a hand in web development, from front-end to back-end and everything in between. Get practical training on the latest in HTML5, CSS3, JavaScript, and the frameworks that build on those technologies.

- All Sessions (Tue-Wed) - All Keynotes (Tue-Wed) - 3-month subscription to Safari Pro - Exhibit Hall (Tue-Wed)
@smockle
smockle / init.coffee
Last active August 29, 2015 14:15
Close inactive tabs using Option-Command-w in Atom Editor
# Add the lines below to your init script,
# accessible via Atom > Open Your Init Script
atom.commands.add 'atom-workspace', 'tabs:force-close-other-tabs', ->
tabBar = atom.workspace.getPanes()[0]
tabBarElement = atom.views.getView(tabBar).querySelector(".tab-bar")
tabBarElement.querySelector(".active").classList.add("right-clicked")
atom.commands.dispatch(tabBarElement, 'tabs:close-other-tabs')
@smockle
smockle / styles.less
Last active August 29, 2015 14:16
Atom Editor One Dark theme modifications for OS X.
// Hide icons in tabs
.tab-bar li.tab .title:before {
display: none;
}
// Left align close button and modified indicator in tabs
.tab-bar .tab.active .title,
.tab-bar .tab .title {
padding-left: 28px;
}
@smockle
smockle / styles.less
Last active August 29, 2015 14:18
Atom Editor styles to differentiate keys and values in JSON files
// Style JSON keys and values differently
atom-text-editor::shadow .meta.structure.dictionary.json {
// Keys
& > .string.quoted.json,
.punctuation.definition.string.json {
color: @blue;
}
// Values
& > .value.json > .string.json,