Skip to content

Instantly share code, notes, and snippets.

View seanblanton's full-sized avatar

Sean Blanton seanblanton

View GitHub Profile
@dotspencer
dotspencer / google-wifi-setup-centurylink.md
Last active October 3, 2023 01:53
How to use Google WiFi with CenturyLink Internet (ZyXEL C3000Z, 80mbps, modem bridge)
@jordandobson
jordandobson / getBoundingLayerForRotatedLayer.coffee
Last active July 7, 2017 21:13
Get Bounding Layer for Rotated Layer
getBoundingLayerForRotatedLayer = (layer) ->
tr = "topRight"; bl = "bottomLeft"; tl = "topLeft"; br = "bottomRight";
center = x: layer.midX, y: layer.midY
size = w: layer.width, h: layer.height
rotation = layer.rotation
corners =
"#{tr}": x: (size.w/2), y: (size.h/2)
"#{bl}": x: -(size.w/2), y: -(size.h/2)
getRotatedPoint = (p) ->
@gomar
gomar / 00-intro.md
Last active January 30, 2024 04:58
Setting up a Keynote document for grid layout design

Setting up a Keynote document for grid layout design

I like (love ?) Keynote because it

  • is a simple to use presentation software,
  • is vector based (when zooming it just looks gorgeous)
  • exports to powerpoint

If I could remove that last argument, I would, but the fact is that, as a consultant, the final document is almost always expected to be a powerpoint document. Don't ask me why, it is just so. I am fighting against it but I did not win the battle so far ...

@paulirish
paulirish / what-forces-layout.md
Last active July 20, 2024 17:43
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@chantastic
chantastic / on-jsx.markdown
Last active May 30, 2024 13:11
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@sarahhenderson
sarahhenderson / 0 Easy deployment with Grunt and git.md
Last active January 29, 2019 20:11
Single command deploy for an Angular/Node web application to Ubuntu EC2 instance

Easy deployment with Grunt and Git

Angular/Node.js web application to Ubuntu EC2 instance

Objective

Deploy entire site to server using a single command grunt deploy

Assumptions

  1. Your web application exists on your local machine in a git repo
  2. You can log into your server via ssh without a password
  3. You are using grunt for your build process
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active July 3, 2024 02:22
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@lemiorhan
lemiorhan / post-receive
Last active February 8, 2023 10:06
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then