This commit is contained in:
Rico Sta. Cruz 2014-07-30 13:53:29 +08:00
parent 5e3ace56a5
commit e07b88d02c
8 changed files with 152 additions and 43 deletions

View File

@ -27,28 +27,15 @@ Here are some badges for open source projects.
### Versions
[![npm version](https://img.shields.io/npm/v/jquery.png)](https://npmjs.org/package/jquery "View this project on npm")
[![npm version](https://img.shields.io/npm/v/PACKAGE.png)](https://npmjs.org/package/PACKAGE "View this project on npm")
[![Gem version](https://img.shields.io/gem/v/rails.png)](http://rubygems.org/gems/rails "View this project in Rubygems")
[![Gem version](https://img.shields.io/gem/v/GEM.png)](http://rubygems.org/gems/GEM "View this project in Rubygems")
[![npm version](https://img.shields.io/npm/v/jquery.svg)](https://npmjs.org/package/jquery "View this project on npm")
[![npm version](https://badge.fury.io/js/jquery.svg)](https://npmjs.org/package/jquery "View this project on npm")
[![Gem version](https://img.shields.io/gem/v/rails.svg)](http://rubygems.org/gems/rails "View this project in Rubygems")
[![Latest version](http://img.shields.io/github/tag/rstacruz/nprogress.svg)](https://github.com/rstacruz/nprogress)
[![Latest version](http://img.shields.io/github/tag/USER/REPO.svg)](https://github.com/USER/REPO)
### Links
[![npm](https://img.shields.io/badge/npm-jquery-brightgreen.png)](https://npmjs.org/package/jquery "View this project on npm")
[![npm](https://img.shields.io/badge/npm-PACKAGE-brightgreen.png)](https://npmjs.org/package/PACKAGE "View this project on npm")
[![Gem](https://img.shields.io/gem/v/gem-rails-brightgreen.png)](http://rubygems.org/gems/rails "View this project in Rubygems")
[![Gem](https://img.shields.io/badge/gem-GEM-brightgreen.png)](http://rubygems.org/gems/GEM "View this project in Rubygems")
### Etc
[![Gitter chat](https://badges.gitter.im/USER/REPO.png)](https://gitter.im/USER/REPO "Gitter chat")

View File

@ -33,9 +33,9 @@ layout: default
flex-wrap: nowrap; /* one-line */
flex-wrap: wrap; /* multi-line */
align-items: flex-start; /* vertically-align to top */
align-items: flex-end; /* vertically-align to bottom */
align-items: center; /* vertically-align to center */
align-items: flex-start; /* vertical-align to top */
align-items: flex-end; /* vertical-align to bottom */
align-items: center; /* vertical-align to center */
align-items: stretch; /* same height on all (default) */
justify-content: flex-start; /* horizontal alignment - default */

10
css.md
View File

@ -37,10 +37,18 @@ Background
### Shorthand
background: #ff0 url(bg.jpg) center top 100px auto no-repeat fixed;
background: #ff0 url(bg.jpg) left top / 100px auto no-repeat fixed;
background: #abc url(bg.png) center center / cover repeat-x local;
/* ^ ^ ^ ^ ^ ^
color image position size repeat attachment */
### Multiple backgrounds
background:
linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
url('background.jpg') center center / cover,
#333;
### Other properties
background-clip: border-box | padding-box | content-box [, ...]*; /* IE9+ */

View File

@ -3,6 +3,10 @@ title: Firefox
layout: default
---
### [Firefox 31](https://www.mozilla.org/en-US/firefox/31.0/releasenotes/) (July 2014)
* CSS: variables
### [Firefox 30](https://developer.mozilla.org/en-US/Firefox/Releases/30) (June 2014)
* CSS: Allow `line-height` in `<input type='button'>`

58
html-input.md Normal file
View File

@ -0,0 +1,58 @@
---
title: "HTML: input tag"
layout: default
---
<input ...
disabled
required
checked
autofocus
autocomplete='off' <!-- autocomplete -->
autocompletetype='cc-exp'
autocapitalize='off' <!-- for mobiles -->
pattern='\d*' <!-- force numeric input in iOS -->
### Input types
Text:
* email
* hidden
* month
* password
* tel
* text
* search
* week
Time:
* date
* datetime
* datetime-local
* time
Etc:
* file
* radio
* checkbox
Buttons:
* button
* reset
* submit
* image
Numeric:
* number
* range
### Ref
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input

View File

@ -3,6 +3,17 @@ title: Ledger CLI
layout: default
---
$ ledger bal
$ ledger reg
$ ledger reg grocery # show entries for grocery
$ ledger bal assets # check if im broke
-b 01/01 # --begin
-e 01/31 # --end
-S date # --sort
-S amount
### Examples
# any/all matches
@ -41,7 +52,8 @@ layout: default
ledger reg -b 01/25 -e 01/27 --subtotal
ledger reg -b 01/25 -e 01/27 --subtotal grocery
## Format
Format
------
2013/01/03 * Rent for January
Expenses:Rent $600.00
@ -121,21 +133,6 @@ layout: default
| also line comment
* also line comment
CLI interface
-------------
$ ledger bal # show balance
$ ledger reg grocery # show entries for grocery
$ ledger print # show entries
$ ledger bal assets # check if im broke
$2000 Assets
$1400 Savings
$600 Cash
$ ledger bal -b 2013/01/01 -e 2013/01/31
### Periods
[interval] [begin] [end]

View File

@ -65,12 +65,17 @@ layout: default
process.stderr.write('...');
function stdin(fn) {
process.stdin.resume(); /* paused by default */
process.stdin.setEncoding('utf8');
var data = '';
process.stdin.on('data', function(chunk) { data += chunk.toString(); });
process.stdin.on('end', function() { fn(null, data); });
process.stdin.setEncoding('utf8');
process.stdin.on('readable', function() {
var chunk = process.stdin.read();
if (chunk !== null) data += chunk;
});
process.stdin.on('end', function() {
fn(null, data);
});
}
### stuff

50
nopt.md Normal file
View File

@ -0,0 +1,50 @@
---
title: Nopt
layout: default
---
```js
var args = require('nopt')({
foo: [String, null],
size: ['big', 'medium', 'small'],
many: [String, Array],
debug: Boolean,
version: Boolean,
help: Boolean
}, {
h: '--help',
v: '--version'
}, process.argv);
args == {
debug: true,
version: true,
size: 'big',
argv: {
remain: ['...', '...'],
cooked: ...,
original: ...
}
}
```
```js
if (args.help) {
console.log([
'Usage:',
' hicat [options] [file]',
'',
'Options:',
' -h, --help print usage information',
' -v, --version show version info and exit',
].join('\n'));
process.exit(0);
}
if (args.version) {
console.log(require('../package.json').version);
process.exit(0);
}
```
https://www.npmjs.org/package/nopt