Skip to content

Instantly share code, notes, and snippets.

View sdougbrown's full-sized avatar

Doug Brown sdougbrown

View GitHub Profile
@gilbert
gilbert / example.js
Last active August 3, 2016 21:19
Mithril.js - Avoiding m.props
// m.prop is a great pattern, but Plain-old JavaScript Objects (POJO) are
// much more pleasant to work with.
// Here's an example of using POJOs with one- and two-way data binding.
// First, the helper methods
m.setValue = function (obj, prop) {
return m.withAttr('value', function(value) { obj[prop] = value })
}
@anandgorantala
anandgorantala / 1_docker-micro-services.txt
Last active January 23, 2020 21:39
Docker setup for nodejs microservices with nginx and rethinkdb
# This shows the setup for two services, an accounts service which connects to a database and a pagerduty service which connects to the pagerduty api
# Directory structure
accounts/
|_ Dockerfile
pagerduty/
|_ Dockerfile
nginx/
|_ conf/
|_ sites.conf
|_ .htpasswd
@Getty
Getty / gist:6369946
Last active December 21, 2015 21:39
I love prefetch....
SELECT "me"."id", "me"."users_id", "me"."context", "me"."context_id",
"me"."content", "me"."deleted", "me"."created", "me"."updated",
"me"."parent_id", "user"."id", "user"."username", "user"."public",
"user"."admin", "user"."email", "user"."gravatar_email",
"user"."userpage", "user"."data", "user"."notes", "user"."created",
"user"."updated", "user"."roles", "token"."id", "token"."msgid",
"token"."msgid_plural", "token"."msgctxt", "token"."type",
"token"."data", "token"."notes", "token"."token_domain_id",
"token"."created", "token"."updated", "token_domain"."id",
"token_domain"."key", "token_domain"."name",
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.