Skip to content

Instantly share code, notes, and snippets.

@pirate
pirate / docker-compose.yml
Last active January 24, 2023 06:41
Example database container setups for PostgreSQL, MariaDB, Redis, Memcached, MongoDB, Neo4j, Hasura GraphQL, CockroachDB, and TiDB in Docker Compose
# Example database container setups for PostgreSQL, MariaDB, Redis, Memcached, MongoDB, Neo4j, Hasura GraphQL, CockroachDB, and TiDB in Docker Compose
# https://gist.github.com/pirate/1fafaa18a47254f388aa5c0f79f7d263
# Goes well with these docker-compose networking/ingress container examples:
# https://gist.github.com/pirate/1996d3ed6c5872b1b7afded250772f7c
version: '2.4'
services:
postgres:
function WhySoManyProps(props) {
const user = extractUser(props);
const fudge = calculateFudge();
const bits = computeBits();
// This is soooooo redundant.
return <SomeComponent user={user} fudge={fudge} bits={bits} />;
}
function Shorthand(props) {
@zshannon
zshannon / 0-Angular Tips.md
Last active August 29, 2015 14:06
AngularJS Tips

Couple abstract ideas:

  • Angular apps are little separate kingdoms.
  • You can't get into them from outside, and it's really frowned upon to use jQuery within them to access the DOM.
  • Angular Controllers extend this concept. They can only control the DOM nodes at and below the node with ng-controller designated.

The loading order is somewhat important. I set it up like this: [jQuery, jQueryUI, Bootstrap, Underscore, Angular Library, any Angular Plugins, Angular Application init file, rest of angular files].