Skip to content

Instantly share code, notes, and snippets.

View adamjgrant's full-sized avatar

Adam Grant adamjgrant

  • Software Engineer
View GitHub Profile
----- BEGIN LICENSE -----
Adam Kochanowicz
Single User License
EA7E-907436
8BAF1796 5C411947 A213CA8B 79AA348D
80E9F99F C3CA2907 098C9D81 0B8D6C15
49B75D15 22F0EB34 6294F3A2 F7E11680
C14C72C9 BB234487 B4A2E136 D8F0A06C
2F60266F 22E73EB2 8558D127 A87BBBA2
67C4FD79 75261410 4D338665 A0B873B7
This file has been truncated, but you can view the full file.
DA PRERJERCT GERTERNBERG ERBERK ERF DA CERMPLERT WERKS ERF WERLERM SHERKSPER, BER
WERLERM SHERKSPER
THERS ERBERK ERS FER DA ERS ERF ERNERN ERNERWHER ERT NER CERST ERND WERTH
ERLMAHST NER RERSTRERCTERNS WHERTSERVER. U MAH CERPER ERT, GERV ERT ERWER ER
RERS ERT ERNDER DA TERMS ERF DA PRERJERCT GERTERNBERG LERCERNS ERNCLERDERD
WERTH THERS ERBERK ER ERNLERN ERT WGERTERNBERGERG
** THERS ERS A CERPERERGHTERD PRERJERCT GERTERNBERG ERBERK, DERTERLS BERLO **
** PLERS FERLO DA CERPERERGHT GERDERLERNERS ERN THERS FERL. **
var $junk = $('div[style], td[style], img[style]');
var $hidden = $('div[style="display:none"], div[style="display: none"], div[style="display:none;"], div[style="display: none;"]');
$($junk).attr('style', '');
$($hidden).hide();
One moment please while we route your chat to a representative.
Thank you for contacting Adobe Sales. My name is Griffin. How may I help you today?
Griffin: Hi, may I have your first name please?
you: Hey. I'm Adam
you: I currently have a plan for InDesign but I'm thinking of getting the full creative cloud suite
you: Can I convert my existing purchase into that?
Griffin: Hello Adam.
Griffin: Sure I can help you to subscribe for creative cloud complete plan now, okay.
you: Just want to make sure my payment for InDesign isn't "sunk"
you: Actually, do you know what plan I have today?

The pattern hash trick

How to have a unique password for every website but only memorize one thing

Update: Thanks to HN commenter, this exists! I should note, however, that it's much more secure to leave the SHA-1 hashing to the app but do your formula editing in your head where hackers can't get to (yet).

Update: Here's how to do it from a Unix command line: echo -n twitter.com0 | sha1sum | awk '{print substr($1, 1, 10)}'

This works on mac: echo -n twitter.com0 | /usr/bin/openssl sha1 | awk '{print substr($1, 1, 10)}'

@adamjgrant
adamjgrant / Responsive text in CSS
Created October 13, 2014 17:46
Here's an easy way to scale up text responsively using CSS
html {
/* Use calc and the vh units to scale up text with screen size */
font-size: calc(14px + 2vh);
}
/* Use rem units to size in multiples of the responsive size. */
p { font-size: 1rem; }
h1 { font-size: 2rem; }
@adamjgrant
adamjgrant / gist:71e47b5fbf7de76d9d45
Last active August 29, 2015 14:15
JSONify text on page
$pieces = $('h1, h2, h3, h4, h5, h6, p, a, blockquote, li')
var textFile = null,
makeTextFile = function (text) {
var data = new Blob([text], {type: 'text/json'});
// If we are replacing a previously generated file we need to
// manually revoke the object URL to avoid memory leaks.
if (textFile !== null) {
window.URL.revokeObjectURL(textFile);
https://data.mixpanel.com/api/2.0/export/?
from_date=2015-03-12&
expire=1329760783&sig=bbe4be1e144d6d6376ef5484745aac45&
to_date=2015-04-12&
api_key=f62aaec4432022279c23bf501df0bef3&
https://www.stathat.com/x/57ZgEc8mYHwHnmaoMqqd/graph/NK5Iw?t=1d15m1w
function sum() {
return [].reduce.call(arguments, function(a, b) {
return a + b;
});
}