- Your class can be no longer than a hundred lines of code.
- Your methods can be no longer than five lines of code
- You can pass no more than four parameters and you can't just make it one big hash.
- In your controller, you can only instantiate one object, to do whatever it is that needs to be done.
- Your view can only know about one instance variable.
- Your Rails view should only send messages to that object i.e., no Demeter violations.[ "thunder dome principal". Translated: one model in, one model out! ]
- Rules are meant to be broken if by breaking them you produce better code. [ ...where "better code" is validated by explaining why you want to break the rule to someone else. ]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I remember very clear I cry when I finish volume 3 of Knuth. | |
% | |
I am work on CSS SQL. | |
% | |
First sign of depression in devops is denial: you start of ignore Nagios alert. | |
% | |
In devops language is not success unless is another language++. | |
% | |
In devops you are addict to graph if first thought after orgasm is send duration and intensity to Graphite. | |
% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base image. | |
FROM fotinakis/baseimage-ruby:2.1.3 | |
# System dependencies for gems. | |
RUN apt-get update | |
RUN apt-get install -y --no-install-recommends libmysqlclient-dev | |
# Add 'web' user which will run the application. | |
RUN adduser web --home /home/web --shell /bin/bash --disabled-password --gecos "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; TODO: pull author initials from (user-full-name) | |
(setq author-initials "EH") | |
(defun set-pivotal-story-id (id) | |
"sets current pivotal tracker story id" | |
(interactive "spivotal-story-id:") | |
(progn | |
(setq pivotal-story-id id))) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o errtrace | |
set -o errexit | |
facter_version=$1 | |
puppet_version=$2 | |
target_volume=$3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |