Skip to content

Instantly share code, notes, and snippets.

View smockle's full-sized avatar

Clay Miller smockle

View GitHub Profile
@smockle
smockle / One Dark.terminal
Created February 18, 2015 23:34
An OS X Terminal profile to match Atom Editor's One Dark syntax theme. Thanks to https://github.com/nathanbuchar/one-dark-terminal for the inspiration!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NGMCAw
IDAAEAGAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVj
dF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltiaWttcn2GjpGa
@smockle
smockle / merge_workflow.sh
Last active March 15, 2017 11:57
Merging a feature branch into master
hub push
hub checkout master
hub pull
hub checkout <feature_branch>
hub pull-request -m "description"
hub checkout master
hub merge <pr_url>
hub push
hub push origin :<feature_branch>
hub branch -d <feature_branch>
@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 / 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 / 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 / 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 / PSUserConfig.txt
Created October 7, 2014 04:19
Always enable overscroll in Photoshop
# Copy this file to:
#
# (OS X)
# ~/Library/Preferences/Adobe Photoshop CC 2014 Settings/PSUserConfig.txt
#
# (Windows)
# \Users\<current user>\AppData\Roaming\Adobe\Adobe Photoshop CC\Adobe Photoshop CC Settings\PSUserConfig.txt
# Overscroll Always
AllowOverScrolling 2
@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 / 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 / MIT-Creative.txt
Created July 3, 2014 07:50
An adaptation of the MIT license, intended for use with creative works.
MIT-Based License For Creative Works
Copyright (c) 2014 Clay Miller
Permission is hereby granted, free of charge, to any person obtaining
a copy of these creative works (the "Works"), to deal in the Works
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Works, and to permit persons to whom the Works are
furnished to do so, subject to the following conditions: