Skip to content

Instantly share code, notes, and snippets.

View jaredhirsch's full-sized avatar
🙃
mostly working in mozilla repositories these days

Jared Hirsch jaredhirsch

🙃
mostly working in mozilla repositories these days
View GitHub Profile
@jaredhirsch
jaredhirsch / gist:5113338
Created March 8, 2013 00:51
awsbox for persona.

I dunno why I always forget this set of steps.

puttin code on an awsbox for dev.

./scripts/deploy.js deploy <the name> -t m1.large
git push <the name> dev:master

if you want to work with unminified code:

ssh app@.personatest.org

  1. javascript + source map.
  2. create a macro that modifies js syntax.
  3. use the macro.
  4. need to regenerate the underlying code + underlying source map.

so it isn't really dynamic.

but if you define source maps, does that mean you can read coffeescript (say) but be editing javascript?

idk if source maps' output gets recycled back into the running interpreter. I think it's just for debugging.

@jaredhirsch
jaredhirsch / gist:5120784
Last active December 14, 2015 17:18
technical blogging: lessons learned getting started

technical blogging

lessons learned getting started

develop a formula

  • meta/method vs content:
    • When I read articles, I don't just want results. I want to learn how to do things myself--reusable stuff.
    • Try to orient small things in context of bigger things.
      • Even if this isn't done explicitly, point of view & meta stuff can still be picked up by your readers.
  • THinking in terms of a bigger picture helps to find gaps in discussion or explanation of specific examples
@jaredhirsch
jaredhirsch / gzipped.png
Last active December 14, 2015 17:28
connect-fonts.

Fantastic front end performance, part 3 - Big performance wins by serving fonts smarter - A Node.js holiday season, part 8

In Persona we cut our page load times in half by serving fonts smarter.  This post outlines exactly how we implemented these performance wins, and gives you tools to do the same.

Introducing connect-fonts

connect-fonts is a Connect font-management middleware that improves @font-face performance by serving locale-specific subsetted font files, reducing downloaded font size up to 80%. It also generates locale/browser-specific @font-face CSS, and manages the CORS header required by Firefox and IE 9+. Subsetted fonts are served from a font pack--a directory tree of font subsets, plus a simple JSON config file. Some common open-source fonts are available in pregenerated font packs on npm, and creating your own font packs is straightforward.

(Feeling lost? We've [put together}(https://gist.github.com/6a68/5187976) a

@jaredhirsch
jaredhirsch / gist:5147408
Created March 12, 2013 21:49
IE8, P3P, & YOU

asdf

@jaredhirsch
jaredhirsch / README.md
Last active December 14, 2015 23:19 — forked from ghiden/bargraph.css
horizontal bar graphs with d3js
@jaredhirsch
jaredhirsch / README.md
Last active December 14, 2015 23:29
simple horiz bar graffage
@jaredhirsch
jaredhirsch / gist:5187976
Last active December 15, 2015 02:29
@font-face links for the connect-fonts article
{
"users": [{
"id": 1,
"lastPasswordReset": 1363889433,
"emails": {
"unverified@testuser.com": {
"type": "secondary",
"verified": false
}
}