Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Cranfill Scotchester

View GitHub Profile
@Scotchester
Scotchester / ResizeArtboard.jsx
Created Oct 11, 2018
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
View ResizeArtboard.jsx
#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] ];
View proposed-icon-names-and-aliases.md

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 Feb 6, 2016
Keybase identity proof
View keybase.md

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 Aug 29, 2015
Illustration Extraction and Compression Procedure
View illustration-compression.md
  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
    1. Choose the PNG-24 format
View gist:a7e9feb25f4d96cc7b4f

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 Nov 19, 2014
Home and End Key Bindings for Sublime Text on OS X
View Default (OSX).sublime-keymap
[
{ "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} }
]
View cfpb-source-code-policy.txt
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 Jun 14, 2013
A CodePen by Scott Cranfill.
View index.html
<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>
You can’t perform that action at this time.