Skip to content

Instantly share code, notes, and snippets.

💭
merging your prs

Tom MacWright tmcw

💭
merging your prs
Block or report user

Report or block tmcw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@popravich
popravich / PostgreSQL_index_naming.rst
Last active Nov 18, 2019
PostgreSQL index naming convention to remember
View PostgreSQL_index_naming.rst

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • key for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;
@tkafka
tkafka / LICENSE.txt
Last active Sep 5, 2019
Drop-in replacement for ReactCSSTransitionGroup that uses velocity.js instead of CSS transforms. Add your own transitions to `transitions` hash.
View LICENSE.txt
The MIT License (MIT)
Copyright (c) 2014 Tomas Kafka
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@avibryant
avibryant / gist:11376572
Last active Mar 13, 2016
Google <=> Open Source Rosetta Stone
View gist:11376572
GFS = HDFS
MapReduce = Hadoop
BigTable = HBase
Protocol Buffers = Thrift or Avro (serialization)
Stubby = Thrift or Avro (RPC)
ColumnIO = Parquet
Dremel = Impala
Chubby = Zookeeper
Omega = Mesos
Borg = Aurora
@XVilka
XVilka / TrueColour.md
Last active Nov 19, 2019
True Colour (16 million colours) support in various terminal applications and terminals
View TrueColour.md

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@hueniverse
hueniverse / gist:7686452
Last active Oct 22, 2019
Walmart Mobile node.js Setup
View gist:7686452

Overview

We run multiple server processes in two data centers. Each process listens on two ports, one for HTTP and one for HTTPS. HTTPS is terminated by Apache prior to reaching node.js. HTTP goes directly from the client to node.js (through a master load balancer). We do not use clusters. We slice our physical servers into thin virtual machines running SmartOS, each with about 3GB of memory designed for a single node.js process.

Our node.js servers are hapi.js servers using the composer functionality and plugins architecture. We have three sets of plugins loaded: mobile web front end experience (single page app), legacy API reverse proxy, and monitoring.

We also serve original node.js services off another server zone which runs closed source plugins using hapi.

Analytics

@mbostock
mbostock / .block
Last active Nov 1, 2019
Save SVG as PNG
View .block
license: gpl-3.0
@konklone
konklone / dc-title-17.md
Last active Dec 15, 2015
DC Title 17 in Markdown, crazy alpha pass
View dc-title-17.md

TITLE 17: REVIEW (Chapter 1 and Chapter 3)

Section 17-101: Appeal from District of Columbia Court of Appeals; filing, form and contents of petition; procedure, generally, on appeal from District of Columbia Court of Appeals; record; rules of court; time for petitioning for allowance of appeal from District of Columbia Court of Appeals; determination of appeal from District of Columbia Court of Appeals. [Repealed]

CREDIT(S)

(July 29, 1970, 84 Stat. 565, Pub. L. 91-358, title I, § 146a1.)

Section 17-104: Appeal from District of Columbia Court of Appeals; filing, form and contents of petition; procedure, generally, on appeal from District of Columbia Court of Appeals; record; rules of court; time for petitioning for allowance of appeal from District of Columbia Court of Appeals; determination of appeal from District of Columbia Court of Appeals. [Repealed]
@sgillies
sgillies / geojson-is-spectacularly-wrong.rst
Last active Dec 12, 2015
Candidate talks for http://foss4g-na.org/call-for-presentations/. Comments and forks welcome. I'm also open to co-presenting.
View geojson-is-spectacularly-wrong.rst

GeoJSON is Spectacularly Wrong

Sean Gillies http://sgillies.net

This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

@tmcw
tmcw / ajax_for_cats.md
Last active Jun 3, 2016
AJAX for Cats
View ajax_for_cats.md

AJAX For Cats

I will assume that you are familiar with Javascript and HTML - read up on jsforcats.com if you need Javascript chops, and Learn HTML for HTML.

AJAX is a feature of Javascript and your browser that downloads new data after you initially request a page: so you live-update content and pull in new bits of content a user requests. AJAX is how the Pinterest home page keeps loading content when you scroll, and it's how Gmail can ring in new emails without requiring you to click 'refresh' all the time.

Let's clear things up. Like Javascript for Cats, it's best to use Google Chrome for this, and to use your web developer extensions.

Requests

@mbostock
mbostock / README.md
Last active Oct 12, 2019
Underscore’s Equivalents in D3
View README.md

Collections

each(array)

Underscore example:

_.each([1, 2, 3], function(num) { alert(num); });
You can’t perform that action at this time.