diff --git a/_layouts/default.html b/_layouts/default.html
index fb8559437..dc12e78e8 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -4,10 +4,18 @@
+
+
- <%= page.meta.title || File.basename(page.file, '.*').capitalize %>
- <%= yield %>
+
+
+
+ <%= page.meta.title || File.basename(page.file, '.*').capitalize %>
+ Index
+
+ <%= yield %>
+
diff --git a/_prettify.scss b/_prettify.scss
index 5a970e2c9..b92b8ad1b 100644
--- a/_prettify.scss
+++ b/_prettify.scss
@@ -1,44 +1,122 @@
+/* Tomorrow Theme */
+/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* Pretty printing styles. Used with prettify.js. */
+/* SPAN elements with the classes below are added by prettyprint. */
+/* plain text */
+.pln {
+ color: #4d4d4c; }
-.str { color: #080; }
-.kwd { color: #008; }
-// .com { color: #607077; background: rgba(black, 0.05); padding: 1px 3px; @include border-radius(2px); }
-.com { color: #3bd; text-shadow: 1px 1px 0 rgba(white, 0.3); }
-.typ { color: #606; }
-.lit { color: #066; }
-.pun { color: #660; }
-.pln { color: #555; }
-.tag { color: #008; }
-.atn { color: #606; }
-.atv { color: #080; }
-.dec { color: #606; }
+@media screen {
+ /* string content */
+ .str {
+ color: #718c00; }
+
+ /* a keyword */
+ .kwd {
+ color: #8959a8; }
+
+ /* a comment */
+ .com {
+ color: #8e908c; }
+
+ /* a type name */
+ .typ {
+ color: #4271ae; }
+
+ /* a literal value */
+ .lit {
+ color: #f5871f; }
+
+ /* punctuation */
+ .pun {
+ color: #4d4d4c; }
+
+ /* lisp open bracket */
+ .opn {
+ color: #4d4d4c; }
+
+ /* lisp close bracket */
+ .clo {
+ color: #4d4d4c; }
+
+ /* a markup tag name */
+ .tag {
+ color: #c82829; }
+
+ /* a markup attribute name */
+ .atn {
+ color: #f5871f; }
+
+ /* a markup attribute value */
+ .atv {
+ color: #3e999f; }
+
+ /* a declaration */
+ .dec {
+ color: #f5871f; }
+
+ /* a variable name */
+ .var {
+ color: #c82829; }
+
+ /* a function name */
+ .fun {
+ color: #4271ae; } }
+/* Use higher contrast and text-weight for printable form. */
+@media print, projection {
+ .str {
+ color: #060; }
+
+ .kwd {
+ color: #006;
+ font-weight: bold; }
+
+ .com {
+ color: #600;
+ font-style: italic; }
+
+ .typ {
+ color: #404;
+ font-weight: bold; }
+
+ .lit {
+ color: #044; }
+
+ .pun, .opn, .clo {
+ color: #440; }
+
+ .tag {
+ color: #006;
+ font-weight: bold; }
+
+ .atn {
+ color: #404; }
+
+ .atv {
+ color: #060; } }
/* Specify class=linenums on a pre to get line numbering */
-ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
+ol.linenums {
+ margin-top: 0;
+ margin-bottom: 0; }
+
+/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
+li.L4,
li.L5,
li.L6,
li.L7,
-li.L8 { list-style-type: none }
+li.L8,
+li.L9 {
+ /* */ }
+
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
-li.L9 { background: #eee }
-
-@media print {
- .str { color: #060; }
- .kwd { color: #006; font-weight: bold; }
- .com { color: #600; font-style: italic; }
- .typ { color: #404; font-weight: bold; }
- .lit { color: #044; }
- .pun { color: #440; }
- .pln { color: #000; }
- .tag { color: #006; font-weight: bold; }
- .atn { color: #404; }
- .atv { color: #060; }
-}
+li.L9 {
+ /* */ }
diff --git a/bg.png b/bg.png
new file mode 100644
index 000000000..970400b93
Binary files /dev/null and b/bg.png differ
diff --git a/css.md b/css.md
index 0c0b411a6..86b0bdfd4 100644
--- a/css.md
+++ b/css.md
@@ -1,6 +1,18 @@
title: CSS
---
+Animations
+----------
+
+### Animtaion
+
+ animation-direction: normal | reverse | alternate | alternate-reverse
+ animation-iteration-count: infinite |
+
+ animation:
+
+ animation: bounce 300ms linear infinite
+
Webkit extensions
-----------------
diff --git a/heroku.md b/heroku.md
index 0cf167ce0..1ba9414d7 100644
--- a/heroku.md
+++ b/heroku.md
@@ -27,3 +27,18 @@
heroku addons:add wildcard_domains
*.yourdomain.com => heroku.com
+
+## htpasswd (for PHP apps)
+
+Create an .htaccess file in the webroot:
+
+ AuthUserFile /app/www/.htpasswd
+ AuthType Basic
+ AuthName "Restricted Access"
+ Require valid-user
+
+Create a .htpasswd file:
+
+ htpasswd -c .htpasswd [username]
+
+https://gist.github.com/3316425
diff --git a/makefile.md b/makefile.md
index 195b9eccf..d3a041e5c 100644
--- a/makefile.md
+++ b/makefile.md
@@ -59,3 +59,7 @@
default:
@echo "hello."
@false
+
+### Inclusion
+
+ include assets.make
diff --git a/rails-forms.md b/rails-forms.md
new file mode 100644
index 000000000..7c90a46f5
--- /dev/null
+++ b/rails-forms.md
@@ -0,0 +1,33 @@
+title: Rails form helpers
+---
+
+### Forms
+
+ # Model:
+ = form_for @post do |f|
+
+ = form_for @post, url: { method: 'put', action: 'create' }, html: { class: 'nifty_form'} do |f|
+
+
+### Fields
+
+ f.check_box :enabled
+ f.text_field :title
+ f.text_area :body, \
+ :size => '60x12'
+
+### Select dropdowns
+
+ f.time_zone_select :time_zone
+ f.date_select :birthday
+
+ f.select :city_id, [['Lisbon',1], ['Madrid',2], ...], 4 # (4 = selected)
+
+ f.collection_select :city_id, City.all, :id, :name
+
+ options_for_select [['Lisbon',1], ['Madrid', 2], ...], 4 # Just makes