Update.
This commit is contained in:
parent
c4634c0cf3
commit
0e0a40cce8
|
@ -4,10 +4,18 @@
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<title></title>
|
<title></title>
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
|
<link href='http://fonts.googleapis.com/css?family=Muli:400,100' rel='stylesheet' type='text/css'>
|
||||||
|
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:400' rel='stylesheet' type='text/css'>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1><%= page.meta.title || File.basename(page.file, '.*').capitalize %></h1>
|
<div class='background'></div>
|
||||||
<%= yield %>
|
<div class='all'>
|
||||||
|
<h1>
|
||||||
|
<%= page.meta.title || File.basename(page.file, '.*').capitalize %>
|
||||||
|
<a class='back' href='.'>Index</a>
|
||||||
|
</h1>
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script>
|
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script>
|
||||||
<script src="http://cachedcommons.org/cache/prettify/1.0.0/javascripts/prettify-min.js"></script>
|
<script src="http://cachedcommons.org/cache/prettify/1.0.0/javascripts/prettify-min.js"></script>
|
||||||
|
|
134
_prettify.scss
134
_prettify.scss
|
@ -1,44 +1,122 @@
|
||||||
|
/* Tomorrow Theme */
|
||||||
|
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
||||||
/* Pretty printing styles. Used with prettify.js. */
|
/* 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; }
|
@media screen {
|
||||||
.kwd { color: #008; }
|
/* string content */
|
||||||
// .com { color: #607077; background: rgba(black, 0.05); padding: 1px 3px; @include border-radius(2px); }
|
.str {
|
||||||
.com { color: #3bd; text-shadow: 1px 1px 0 rgba(white, 0.3); }
|
color: #718c00; }
|
||||||
.typ { color: #606; }
|
|
||||||
.lit { color: #066; }
|
/* a keyword */
|
||||||
.pun { color: #660; }
|
.kwd {
|
||||||
.pln { color: #555; }
|
color: #8959a8; }
|
||||||
.tag { color: #008; }
|
|
||||||
.atn { color: #606; }
|
/* a comment */
|
||||||
.atv { color: #080; }
|
.com {
|
||||||
.dec { color: #606; }
|
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 */
|
/* 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.L0,
|
||||||
li.L1,
|
li.L1,
|
||||||
li.L2,
|
li.L2,
|
||||||
li.L3,
|
li.L3,
|
||||||
|
li.L4,
|
||||||
li.L5,
|
li.L5,
|
||||||
li.L6,
|
li.L6,
|
||||||
li.L7,
|
li.L7,
|
||||||
li.L8 { list-style-type: none }
|
li.L8,
|
||||||
|
li.L9 {
|
||||||
|
/* */ }
|
||||||
|
|
||||||
/* Alternate shading for lines */
|
/* Alternate shading for lines */
|
||||||
li.L1,
|
li.L1,
|
||||||
li.L3,
|
li.L3,
|
||||||
li.L5,
|
li.L5,
|
||||||
li.L7,
|
li.L7,
|
||||||
li.L9 { background: #eee }
|
li.L9 {
|
||||||
|
/* */ }
|
||||||
@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; }
|
|
||||||
}
|
|
||||||
|
|
12
css.md
12
css.md
|
@ -1,6 +1,18 @@
|
||||||
title: CSS
|
title: CSS
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Animations
|
||||||
|
----------
|
||||||
|
|
||||||
|
### Animtaion
|
||||||
|
|
||||||
|
animation-direction: normal | reverse | alternate | alternate-reverse
|
||||||
|
animation-iteration-count: infinite | <number>
|
||||||
|
|
||||||
|
animation: <name> <duration> <timing-function> <delay> <count> <direction> <fill-mode>
|
||||||
|
|
||||||
|
animation: bounce 300ms linear infinite
|
||||||
|
|
||||||
Webkit extensions
|
Webkit extensions
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
15
heroku.md
15
heroku.md
|
@ -27,3 +27,18 @@
|
||||||
heroku addons:add wildcard_domains
|
heroku addons:add wildcard_domains
|
||||||
|
|
||||||
*.yourdomain.com => heroku.com
|
*.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
|
||||||
|
|
|
@ -59,3 +59,7 @@
|
||||||
default:
|
default:
|
||||||
@echo "hello."
|
@echo "hello."
|
||||||
@false
|
@false
|
||||||
|
|
||||||
|
### Inclusion
|
||||||
|
|
||||||
|
include assets.make
|
||||||
|
|
|
@ -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 <option> tags
|
||||||
|
|
||||||
|
### The rest
|
||||||
|
|
||||||
|
f.submit "Create"
|
||||||
|
|
|
@ -43,34 +43,6 @@ http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html
|
||||||
time_tag Date.yesterday, 'Yesterday' #=> <time datetime="2010-11-03">Yesterday<%rtime>
|
time_tag Date.yesterday, 'Yesterday' #=> <time datetime="2010-11-03">Yesterday<%rtime>
|
||||||
time_tag Date.today, :pubdate => true #=> <time datetime="2010-11-04" pubdate="pubdate">November 04, 2010</time>
|
time_tag Date.today, :pubdate => true #=> <time datetime="2010-11-04" pubdate="pubdate">November 04, 2010</time>
|
||||||
|
|
||||||
## Forms
|
|
||||||
|
|
||||||
### Forms
|
|
||||||
|
|
||||||
= form_for @post 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 <option> tags
|
|
||||||
|
|
||||||
### The rest
|
|
||||||
|
|
||||||
f.submit "Create"
|
|
||||||
|
|
||||||
### Files
|
### Files
|
||||||
|
|
||||||
= form_for @post, :multipart => true do |f|
|
= form_for @post, :multipart => true do |f|
|
||||||
|
|
109
style.sass
109
style.sass
|
@ -1,18 +1,55 @@
|
||||||
@import 'compass/css3'
|
@import 'compass/css3'
|
||||||
|
|
||||||
body
|
= scrollbar
|
||||||
font-family: Helvetica Neue, helvetica, sans-serif
|
&::-webkit-scrollbar
|
||||||
|
width: 10px
|
||||||
|
height: 10px
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb
|
||||||
|
background: rgba(0, 0, 0, 0.1)
|
||||||
|
border-radius: 5px
|
||||||
|
border: solid 2px (#f7f7f2 * 1.04)
|
||||||
|
|
||||||
|
&:hover::-webkit-scrollbar-thumb
|
||||||
|
background: rgba(0, 0, 0, 0.2)
|
||||||
|
|
||||||
|
body, input, td, textarea
|
||||||
|
font-family: Muli, Helvetica Neue, helvetica, sans-serif
|
||||||
font-size: 14px
|
font-size: 14px
|
||||||
line-height: 1.5
|
line-height: 1.5
|
||||||
|
|
||||||
html
|
html
|
||||||
background: #fafafa
|
// background: white url(bg.png)
|
||||||
|
background: white
|
||||||
|
padding: 60px 20px
|
||||||
|
|
||||||
body
|
@media screen and (max-width: 800px)
|
||||||
width: 800px
|
html
|
||||||
margin: 20px auto
|
padding: 20px
|
||||||
|
@media screen and (max-width: 500px)
|
||||||
|
html
|
||||||
|
padding: 0
|
||||||
|
|
||||||
|
.background
|
||||||
|
position: fixed
|
||||||
|
top: 0
|
||||||
|
left: 0
|
||||||
|
height: 100%
|
||||||
|
width: 100%
|
||||||
|
z-index: -2
|
||||||
|
background: url(https://d3levm2kxut31z.cloudfront.net/assets/locations/nowhere-cc1d85583c8a7ef5ee50282edc703fbe.jpg)
|
||||||
|
background-size: 100%
|
||||||
|
|
||||||
|
.all
|
||||||
|
position: relative
|
||||||
|
z-index: 1
|
||||||
|
|
||||||
|
max-width: 700px
|
||||||
|
min-width: 400px
|
||||||
|
margin: 0 auto
|
||||||
padding: 40px
|
padding: 40px
|
||||||
+box-shadow(1px 0 0 rgba(black, 0.05), -1px 0 0 rgba(black, 0.05), 0 0 4px rgba(black, 0.1), 0 0 0 5px rgba(black, 0.05))
|
+box-shadow(1px 0 0 rgba(black, 0.05), -1px 0 0 rgba(black, 0.05), 0 0 4px rgba(black, 0.1), 0 0 0 5px rgba(black, 0.05))
|
||||||
|
+border-radius(2px)
|
||||||
background: #fff
|
background: #fff
|
||||||
color: #333
|
color: #333
|
||||||
|
|
||||||
|
@ -24,9 +61,9 @@ h1, h2, h3, h4, h5, h6
|
||||||
|
|
||||||
h1
|
h1
|
||||||
text-align: left
|
text-align: left
|
||||||
font-size: 36pt
|
font-size: 26pt
|
||||||
line-height: 30pt
|
line-height: 30pt
|
||||||
color: #aaa
|
color: #ccc
|
||||||
|
|
||||||
margin: -40px -40px 40px -40px
|
margin: -40px -40px 40px -40px
|
||||||
padding: 40px 40px
|
padding: 40px 40px
|
||||||
|
@ -34,35 +71,74 @@ h1
|
||||||
|
|
||||||
font-weight: 100
|
font-weight: 100
|
||||||
|
|
||||||
|
overflow: hidden
|
||||||
|
|
||||||
|
// Back button!
|
||||||
|
h1 .back
|
||||||
|
float: right
|
||||||
|
|
||||||
|
display: inline-block
|
||||||
|
padding: 0 20px
|
||||||
|
height: 32px
|
||||||
|
line-height: 32px
|
||||||
|
|
||||||
|
font-size: 9pt
|
||||||
|
|
||||||
|
background-color: #fafafa
|
||||||
|
+background(linear-gradient(top, #fafafa, #fafafa * 0.98))
|
||||||
|
|
||||||
|
+box-shadow(inset 0 0 0 1px rgba(black, 0.1), inset 0 2px 0 rgba(white, 0.5))
|
||||||
|
+border-radius(3px)
|
||||||
|
|
||||||
|
color: #aaa
|
||||||
|
text-shadow: 0 1px 0 rgba(white, 0.9)
|
||||||
|
text-decoration: none
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
+box-shadow(inset 0 0 0 1px rgba(black, 0.1), inset 0 2px 0 rgba(white, 0.5), 0 1px 5px rgba(black, 0.1))
|
||||||
|
|
||||||
|
&:active
|
||||||
|
+box-shadow(inset 0 0 0 1px rgba(black, 0.1), inset 2px 2px 4px rgba(black, 0.1))
|
||||||
|
|
||||||
|
&:before
|
||||||
|
content: '\238b'
|
||||||
|
margin-right: 5px
|
||||||
|
color: #888
|
||||||
|
|
||||||
// Individual headings
|
// Individual headings
|
||||||
h2, h3
|
h2, h3
|
||||||
color: #38d
|
color: #38d
|
||||||
font-size: 1.3em
|
font-size: 1.2em
|
||||||
padding-bottom: 10px
|
padding-bottom: 10px
|
||||||
|
font-weight: normal
|
||||||
|
|
||||||
h3
|
h3
|
||||||
font-size: 1.3em
|
font-size: 1.3em
|
||||||
|
|
||||||
pre, code
|
pre, code
|
||||||
font-family: monaco, monospace
|
font-family: Menlo, Ubuntu Mono, monaco, monospace
|
||||||
font-size: 12px
|
font-size: 12px
|
||||||
color: #444
|
color: #444
|
||||||
|
|
||||||
pre
|
pre
|
||||||
line-height: 1.6
|
line-height: 1.4
|
||||||
background: #f7f7f2
|
background: (#f7f7f2 * 1.04)
|
||||||
padding: 20px 35px
|
padding: 20px
|
||||||
+box-shadow(inset 0 3px 2px -2px rgba(black, 0.1))
|
+box-shadow(inset 0 3px 2px -2px rgba(black, 0.1))
|
||||||
|
|
||||||
text-shadow: 0 1px 0 rgba(white, 0.9)
|
text-shadow: 0 1px 0 rgba(white, 0.9)
|
||||||
|
|
||||||
border-top: solid 1px #ddd
|
border-top: solid 1px #eee
|
||||||
border-bottom: solid 1px #ddd
|
border-bottom: solid 1px #eee
|
||||||
|
|
||||||
overflow-x: auto
|
overflow-x: auto
|
||||||
|
+scrollbar
|
||||||
|
|
||||||
margin-left: -40px
|
margin-left: -40px
|
||||||
margin-right: -40px
|
margin-right: -40px
|
||||||
|
padding: 20px 40px
|
||||||
|
// border: solid 1px #eee
|
||||||
|
// +border-radius(2px)
|
||||||
|
|
||||||
// Code block
|
// Code block
|
||||||
h2+pre, h3+pre
|
h2+pre, h3+pre
|
||||||
|
@ -80,6 +156,7 @@ ul.pages
|
||||||
|
|
||||||
li
|
li
|
||||||
width: 20%
|
width: 20%
|
||||||
|
min-width: 100px
|
||||||
float: left
|
float: left
|
||||||
|
|
||||||
a
|
a
|
||||||
|
@ -96,7 +173,7 @@ ul.pages
|
||||||
color: #999
|
color: #999
|
||||||
|
|
||||||
a:hover
|
a:hover
|
||||||
background: #eee
|
background: #fafafa
|
||||||
|
|
||||||
li:first-letter
|
li:first-letter
|
||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
|
|
30
vim.md
30
vim.md
|
@ -40,6 +40,36 @@ Example:
|
||||||
yip - Yank inner paragraph
|
yip - Yank inner paragraph
|
||||||
yap - Yank paragraph (including newline)
|
yap - Yank paragraph (including newline)
|
||||||
|
|
||||||
|
Folds
|
||||||
|
-----
|
||||||
|
|
||||||
|
zo - Open
|
||||||
|
zO - Open, recursive
|
||||||
|
zc - Close
|
||||||
|
zC - Close, recursive
|
||||||
|
za - Toggle
|
||||||
|
zA - Toggle, recursive
|
||||||
|
|
||||||
|
zv - Open folds for this line
|
||||||
|
|
||||||
|
zM - Close all
|
||||||
|
zR - Open all
|
||||||
|
|
||||||
|
zm - Fold more (foldlevel += 1)
|
||||||
|
zr - Fold less (foldlevel -= 1)
|
||||||
|
|
||||||
|
zx - Update
|
||||||
|
|
||||||
|
Scrolling
|
||||||
|
---------
|
||||||
|
|
||||||
|
zz - Center this line
|
||||||
|
|
||||||
|
Windows
|
||||||
|
-------
|
||||||
|
|
||||||
|
z{height}<Cr> - Resize pane to {height} lines tall
|
||||||
|
|
||||||
Tags
|
Tags
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue