Skip to content

Instantly share code, notes, and snippets.

View originalhat's full-sized avatar
👾
L I M I T L E S S

Devin Brown originalhat

👾
L I M I T L E S S
View GitHub Profile
@originalhat
originalhat / service-workers.md
Last active December 8, 2017 17:47
Service Workers

Service Workers

A service worker is a script that is run by your browser in the background, separate from a web page, opening the door to features which don't need a web page or user interaction. Rich offline experiences, periodic background syncs, push notifications— functionality that would normally require a native application—are coming to the web.

  • SW are are just JS workers, so they can't access the DOM directly
  • a SW can communicate w/ the pages it controls by responding to message sent via the postMessage interface
  • SW is a programmable network proxy, allowing you to conrol how network requests from your page are handled
  • it runs only when needed, and terminiates when unneeded (cannot rely on global state)
  • service workers make extense use of promises

Monolithic repositories

  1. full-stack dependencies & modifications in one place
  2. independent deploys

We have a single large depot with almost all of Google's projects on it. This aids agile development and is much loved by our users, since it allows almost anyone to easily view almost any code, allows projects to share code, and allows engineers to move freely from project to project. Documentation and data is stored on the server as well as code.

Git Subtree

>Git subtree allows you to insert any repository as a sub-directory of another one. It is one of several ways Git projects can manage project dependencies.

@originalhat
originalhat / gist:5258119
Last active December 29, 2016 23:05
using rebase to remove a commit

Using Rebase to Remove Bad Commits

Rebase at your own risk!

Fixing up and squashing commits with rebase is great fun and handy to keep the logs clean from lots of little commits like typos, but only before a push (unless you're sure nobody else has pulled since then).

When you rebase, it re-writes all SHA values after the removed commit(s). This can be troublesome when you may have already pushed to a remote. This has serious implications for breaking the repository for collaborators.

Create & Enter the Branch

Titles / Text

  • how is overflow handled?
  • weight / font-size / line height / letter spacing?
  • what is the behavior if the text / title is empty?

Inputs

  • validations?
  • error case styling & messaging?
@originalhat
originalhat / rails-database-replication.md
Created January 3, 2014 18:28
rails database replication

Rails Database Replication

@originalhat
originalhat / mongo-cheat-sheet.md
Last active December 31, 2015 18:29
mongo cheat sheet

Mongo Cheat Sheet

Connect to Host

mongo <host>:<port>

Find Primary Host

rs.status()
@originalhat
originalhat / ff-centos-upgrade.txt
Last active December 30, 2015 04:29
upgrading firefox on CentOS via command line
# CentOS Firefox Upgrade
# Update Yum
yum update
# Check Firefox Availability
yum --enablerepo=remi list firefox
@originalhat
originalhat / gist:7356964
Last active December 27, 2015 16:39
Rails 4.0.1 Upgrade Notes

Rails 4.0.1 Upgrade Notes

Problem:

ActionView::Template::Error: No route matches {:id=>nil} missing required keys: [:id]

Solution: