Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz committed Jul 30, 2014
1 parent 5e3ace5 commit e07b88d
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 43 deletions.
19 changes: 3 additions & 16 deletions badges.md
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions css-flexbox.md
Expand Up @@ -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 */
Expand Down
14 changes: 11 additions & 3 deletions css.md
Expand Up @@ -37,9 +37,17 @@ Background

### Shorthand

background: #ff0 url(bg.jpg) center top 100px auto no-repeat fixed;
/* ^ ^ ^ ^ ^ ^
color image position size repeat attachment */
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

Expand Down
4 changes: 4 additions & 0 deletions firefox.md
Expand Up @@ -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'>`
Expand Down
58 changes: 58 additions & 0 deletions html-input.md
@@ -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
29 changes: 13 additions & 16 deletions ledger.md
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
15 changes: 10 additions & 5 deletions nodejs.md
Expand Up @@ -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
Expand Down
50 changes: 50 additions & 0 deletions nopt.md
@@ -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

0 comments on commit e07b88d

Please sign in to comment.