Skip to content

Instantly share code, notes, and snippets.

// A Mobx friendly utility to ease the late dereference of
// objects' observable properties.
// Using Ramda here but you can use your own version of these functions
import { path, init, last, mapObjIndexed } from 'ramda';
// This is the supporting class, see `late` and `deref` later for actual use
class LateDeref {
constructor(obj, field) {
this.obj = obj;
.factory("injectCSS", ['$q', '$http', 'MeasurementsService', function($q, $http, MeasurementsService){
var injectCSS = {};
var createLink = function(id, url) {
var link = document.createElement('link');
link.id = id;
link.rel = "stylesheet";
link.type = "text/css";
link.href = url;
return link;
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@gkellogg
gkellogg / schema-heir.jsonld
Last active January 3, 2024 07:26
Schema.org class heirarchy in JSON-LD
{
"@context": {
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "http://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"rdfs:subClassOf": {
"@type": "@id"
},
"name": "rdfs:label",
"description": "rdfs:comment",
@mariszin
mariszin / foundation_paginate.rb
Last active September 30, 2015 04:17
Make will_paginate generate markup for Zurb Foundation
# NOTE - I do not support this code anymore.
# You should use plambjet version @ https://gist.github.com/pjambet/5229322
#
# Based on https://gist.github.com/1182136 and https://gist.github.com/1586384
# Make the will_paginate generate markup for Zurb Foundation
# Put this in config/initializers/foundation_paginate.rb
module WillPaginate
module ViewHelpers
class LinkRenderer < LinkRendererBase
protected