defmodule Map.Helpers do | |
@moduledoc """ | |
Functions to transform maps | |
""" | |
@doc """ | |
Convert map string camelCase keys to underscore_keys | |
""" | |
def underscore_keys(nil), do: nil |
port module Spelling exposing (..) | |
import Html exposing (..) | |
import Html.App as App | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import String | |
main = |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
Should be work with 0.18
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !
myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
npm shrinkwrap
is useful, but maddening (once it's in place and you want to update a package).
Say you've got a package.json
with module ember-cli
as a devDependency
currently at version 1.13.1
. And you have an npm-shrinkwrap.json
file too, generated with the --dev
flag.
If you change the version of ember-cli
to, say, 1.13.8
in package.json
and run npm install
, nothing will happen.
If you do that and manually change references in the shrinkwrap file, you will still have trouble (as nested dependencies may now be incorrect).
;; A nock interpreter | |
(defun tar (a f) | |
(labels ((fas (b a) | |
(declare (integer b)) | |
(cond | |
((= b 1) a) | |
((= b 2) (car a)) | |
((= b 3) (cdr a)) | |
((evenp b) (car (fas (/ b 2) a))) | |
((oddp b) (cdr (fas (/ (1- (the integer b)) 2) a)))))) |
;;; packages.el --- elm Layer packages File for Spacemacs | |
;; | |
;; Copyright (c) 2012-2014 Sylvain Benner | |
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors | |
;; | |
;; Author: Sylvain Benner <[email protected]> | |
;; URL: https://github.com/syl20bnr/spacemacs | |
;; | |
;; This file is not part of GNU Emacs. | |
;; |
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
“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?