Skip to content

Instantly share code, notes, and snippets.

View Scotchester's full-sized avatar

Scott Cranfill Scotchester

View GitHub Profile
@Scotchester
Scotchester / ResizeArtboard.jsx
Created October 11, 2018 20:57
An Adobe Illustrator script for resizing the first artboard of a document horizontally, to fit the width of the first item on the artboard, but leaving the artboard height the same
#target illustrator
#targetengine main
var doc = app.activeDocument;
var artboard = doc.artboards[0];
var art = doc.pageItems[0];
var coordinates = art.position;
var desiredW = art.width;
art.position = [ 0, coordinates[1] ];

Financial products, services, and concepts

Current canonical name Proposed canonical name Proposed aliases
bank-account bank bank-account
building-credit
buying-car car car-loan, auto, auto-loan
complaint
contract fountain-pen contract
credit-card
@Scotchester
Scotchester / keybase.md
Created February 6, 2016 20:51
Keybase identity proof

Keybase proof

I hereby claim:

  • I am Scotchester on github.
  • I am scranfill (https://keybase.io/scranfill) on keybase.
  • I have a public key whose fingerprint is 2DC6 8B6A E570 89FF 97E7 5B91 542B CCB4 F4D6 20B2

To claim this, I am signing this object:

@Scotchester
Scotchester / illustration-compression.md
Last active August 29, 2015 14:26
Illustration Extraction and Compression Procedure
  1. Create a new file (RGB, 72dpi) at the desired size for the illustration
  2. Copy illustration from design comp
  3. Paste into the new file
  4. Ensure the illustration's center point is exactly centered on artboard
  5. If this is a circular image or has curving shapes right at the edge:
    1. Relative to center point, scale down the whole image by 1 pixel
    2. Turn on Pixel Preview, ensure that no pixels are bleeding off the artboard
    3. Turn off Pixel Preview
  6. File > Save for Web
  7. Choose the PNG-24 format
@Scotchester
Scotchester / gist:a7e9feb25f4d96cc7b4f
Created February 18, 2015 15:42
Semantic Line Breaks

Please employ "semantic line breaks" here. I ask this because horizontal scrolling is the devil. (At least GitHub diffs don't do that anymore, but it can still happen in your text editor, depending on one's configuration.)

But seriously, the real reason is this: having multiple lines makes for easier diffing if you change a tiny part of a whole paragraph. See here for more.

@Scotchester
Scotchester / Default (OSX).sublime-keymap
Created November 19, 2014 02:47
Home and End Key Bindings for Sublime Text on OS X
[
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["super+home"], "command": "move_to", "args": {"to": "bof"} },
{ "keys": ["super+end"], "command": "move_to", "args": {"to": "eof"} },
{ "keys": ["super+shift+home"], "command": "move_to", "args": {"to": "bof", "extend": true} },
{ "keys": ["super+shift+end"], "command": "move_to", "args": {"to": "eof", "extend": true} }
]
@Scotchester
Scotchester / cfpb-source-code-policy.txt
Last active December 22, 2015 05:49 — forked from CFPBadmin/cfpb-source-code-policy.txt
CFPB's Source Code Policy
1. USE OF EXTERNAL OPEN SOURCE SOFTWARE
a) "Open Source Software" (OSS) is software that allows its recipients to modify and redistribute
the source code; as such, "open source" is a copyright and distribution framework and makes no
implications regarding technical support or indemnification. In almost all cases, OSS meets
the definition of "commercial computer software" and shall be given appropriate statutory
preference in accordance with 41 USC 264B (reference (b)) (see also FAR 2.101(b), 12_1.html
12.000, 12.101 (reference (c))).
b) Executive agencies, including CFPB, are required to conduct market research when preparing for
@Scotchester
Scotchester / index.html
Created June 14, 2013 18:52
A CodePen by Scott Cranfill.
<link href="" rel="stylesheet">
<ul class="menu">
<li><a href="">
<span class="icon-stack">
<i class="icon-circle icon-stack-base"></i>
<i class="icon-plus icon-light"></i>
</span>
Read the full policy
</a></li>