This commit is contained in:
parent
0afa45b3c2
commit
766a985575
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
title: Appcache
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
### Format
|
||||||
|
|
||||||
|
CACHE MANIFEST
|
||||||
|
# version
|
||||||
|
|
||||||
|
CACHE:
|
||||||
|
http://www.google.com/jsapi
|
||||||
|
/assets/app.js
|
||||||
|
/assets/bg.png
|
||||||
|
|
||||||
|
NETWORK:
|
||||||
|
*
|
|
@ -0,0 +1,33 @@
|
||||||
|
---
|
||||||
|
title: Bootstrap
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
### Media queries
|
||||||
|
|
||||||
|
/* Small devices (tablets, 768px and up) */
|
||||||
|
@media (min-width: @screen-sm-min)
|
||||||
|
|
||||||
|
/* Medium devices (desktops, 992px and up) */
|
||||||
|
@media (min-width: @screen-md-min)
|
||||||
|
|
||||||
|
/* Large devices (large desktops, 1200px and up) */
|
||||||
|
@media (min-width: @screen-lg-min)
|
||||||
|
|
||||||
|
### Max
|
||||||
|
|
||||||
|
/* mobile < 768px */
|
||||||
|
@media (max-width: @screen-xs-max)
|
||||||
|
|
||||||
|
/* tablets < 992px */
|
||||||
|
@media (max-width: @screen-sm-max)
|
||||||
|
|
||||||
|
/* desktop < 1200px */
|
||||||
|
@media (max-width: @screen-md-max)
|
||||||
|
|
||||||
|
### Columns
|
||||||
|
|
||||||
|
.col-xs-1
|
||||||
|
.col-sm-1
|
||||||
|
.col-md-1
|
||||||
|
.col-lg-1
|
|
@ -0,0 +1,56 @@
|
||||||
|
---
|
||||||
|
title: CSS flexbox
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
Basic
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container > div {
|
||||||
|
flex: 0 1 auto; /* grow shrink basis */
|
||||||
|
}
|
||||||
|
|
||||||
|
Full
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
display: inline-flex;
|
||||||
|
|
||||||
|
flex-direction: row; /* ltr - default */
|
||||||
|
flex-direction: row-reverse; /* rtl */
|
||||||
|
|
||||||
|
flex-direction: column; /* top-bottom */
|
||||||
|
flex-direction: column-reverse; /* bottom-top */
|
||||||
|
|
||||||
|
flex-wrap: nowrap; /* one-line */
|
||||||
|
flex-wrap: wrap; /* multi-line */
|
||||||
|
|
||||||
|
align-items: flex-start; /* vertical alignment - default */
|
||||||
|
align-items: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
justify-content: flex-start; /* horizontal alignment - default */
|
||||||
|
justify-content: flex-end;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container > div {
|
||||||
|
flex: 1 0 0;
|
||||||
|
order: 1;
|
||||||
|
flex-grow: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
### Centering
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container > div {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
title: Email
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
### Avoid these
|
||||||
|
|
||||||
|
* position (Yahoo, Gmail)
|
||||||
|
* box-shadow (Yahoo, Gmail)
|
||||||
|
* height (Outlook)
|
||||||
|
* width in p/div (Outlook)
|
||||||
|
* padding in p/div (Outlook)
|
||||||
|
* data-URI (all webmail)
|
||||||
|
|
||||||
|
### Basic layout
|
||||||
|
|
||||||
|
<table cellpadding=0 cellspacing=0"
|
||||||
|
<tr>
|
||||||
|
<td width=auto>
|
||||||
|
<td width=600px background=white>
|
||||||
|
<td width=auto>
|
||||||
|
|
||||||
|
### Responsive
|
||||||
|
|
||||||
|
@media only screen and (max-device-width: 480px)
|
|
@ -58,6 +58,12 @@ layout: default
|
||||||
req.is('html')
|
req.is('html')
|
||||||
req.is('text/html')
|
req.is('text/html')
|
||||||
|
|
||||||
|
req.headers
|
||||||
|
req.headers['host']
|
||||||
|
req.headers['user-agent']
|
||||||
|
req.headers['accept-encoding']
|
||||||
|
req.headers['accept-language']
|
||||||
|
|
||||||
|
|
||||||
## Response
|
## Response
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,12 @@ layout: default
|
||||||
|
|
||||||
### To web
|
### To web
|
||||||
|
|
||||||
|
# no audio
|
||||||
|
ffmpeg -i input.mov -vcodec h264 -acodec null -strict -2 output.mp4
|
||||||
|
ffmpeg -i input.mov -vcodec libvpx -acodec null output.webm
|
||||||
|
|
||||||
ffmpeg -i input.mov -vcodec h264 -acodec aac -strict -2 output.mp4
|
ffmpeg -i input.mov -vcodec h264 -acodec aac -strict -2 output.mp4
|
||||||
ffmpeg -i input.mov -vcodec libvpx -acodec libvorbis output.webm
|
ffmpeg -i input.mov -vcodec libvpx -acodec libvorbis output.webm
|
||||||
# -acodec null
|
|
||||||
|
|
||||||
<video width="320" height="240" controls>
|
<video width="320" height="240" controls>
|
||||||
<source src="movie.mp4"></source>
|
<source src="movie.mp4"></source>
|
||||||
|
|
|
@ -15,7 +15,11 @@ layout: default
|
||||||
|
|
||||||
The `coverage` task injects your source files (`lib`) with jscoverage hooks, runs `mocha -R html-cov`, then restores later.
|
The `coverage` task injects your source files (`lib`) with jscoverage hooks, runs `mocha -R html-cov`, then restores later.
|
||||||
|
|
||||||
"coverage": "./node_modules/.bin/jscoverage lib && (mv lib lib~; mv lib-cov lib; ./node_modules/.bin/mocha -R html-cov > coverage.html; mv -f lib~ lib)"
|
/* directory */
|
||||||
|
"coverage": "mv lib lib~; (./node_modules/.bin/jscoverage lib~ lib; ./node_modules/.bin/mocha -R html-cov > coverage.html); rm -rf lib; mv lib~ lib"
|
||||||
|
|
||||||
|
/* single file */
|
||||||
|
"coverage": "(cp index.js index.js~; ./node_modules/.bin/jscoverage index.js; mv index-cov.js index.js; ./node_modules/.bin/mocha -R html-cov > coverage.html); mv index.js~ index.js"
|
||||||
|
|
||||||
### Run
|
### Run
|
||||||
|
|
||||||
|
|
|
@ -190,6 +190,7 @@ CLI interface
|
||||||
# [balance] no grand total
|
# [balance] no grand total
|
||||||
-s, --subtotal # [balance] show sub-accounts
|
-s, --subtotal # [balance] show sub-accounts
|
||||||
# [other] show subtotals
|
# [other] show subtotals
|
||||||
|
--flat
|
||||||
|
|
||||||
### Effective dates
|
### Effective dates
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,7 @@ layout: default
|
||||||
});
|
});
|
||||||
proc.on('exit', function(code) { ... });
|
proc.on('exit', function(code) { ... });
|
||||||
|
|
||||||
|
// also { stdio: ['pipe', 'pipe', process.stdout] }
|
||||||
// also { stdio: [process.stdin, process.stderr, process.stdout] }
|
// also { stdio: [process.stdin, process.stderr, process.stdout] }
|
||||||
|
|
||||||
proc.stdout.on('data', function (data) {
|
proc.stdout.on('data', function (data) {
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
title: Rubiks cube
|
||||||
|
---
|
||||||
|
|
||||||
|
Getting the cross
|
||||||
|
|
||||||
|
* L (N W C)
|
||||||
|
* line (E C W)
|
||||||
|
* cross (N E W S C)
|
||||||
|
|
||||||
|
`F R U R' U' F'`
|
||||||
|
|
||||||
|
Aligning the cross's sides:
|
||||||
|
|
||||||
|
* Nothing aligned
|
||||||
|
* line (N C S)
|
||||||
|
* L (N C E)
|
||||||
|
* ALl are aligned
|
||||||
|
|
||||||
|
`R U R' U R 2U R'`
|
||||||
|
|
||||||
|
Aligning the corners:
|
||||||
|
|
||||||
|
* 0 spots ok
|
||||||
|
* 1 spot ok in south-east
|
||||||
|
* 4 spots ok: proceed
|
||||||
|
|
||||||
|
`U R U' L' U R' U' L`
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,8 @@ layout: default
|
||||||
gem install *.gem # Install locally
|
gem install *.gem # Install locally
|
||||||
gem push *.gem # Upload to rubygems.org
|
gem push *.gem # Upload to rubygems.org
|
||||||
gem yank foogem -v 0.0.1 # Take it back
|
gem yank foogem -v 0.0.1 # Take it back
|
||||||
gem owner -a rico@ricostacruz.com
|
|
||||||
|
gem owner foogem -a rico@ricostacruz.com
|
||||||
|
|
||||||
gem list # List local gems
|
gem list # List local gems
|
||||||
gem which rake # Point to where lib/rake.rb is
|
gem which rake # Point to where lib/rake.rb is
|
||||||
|
|
Loading…
Reference in New Issue