Content formatting update (#1965)
This commit is contained in:
parent
ab9ab48bc5
commit
711ba22911
|
@ -1,9 +1,14 @@
|
|||
---
|
||||
title: React-router
|
||||
category: React
|
||||
layout: default-ad
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### About
|
||||
{: .-intro}
|
||||
|
||||
- <https://reactrouter.com/>
|
||||
|
||||
{% raw %}
|
||||
|
||||
### Basic
|
||||
|
|
17
riot.md
17
riot.md
|
@ -1,10 +1,17 @@
|
|||
---
|
||||
title: Riot.js
|
||||
category: JavaScript libraries
|
||||
layout: default-ad
|
||||
layout: layout.md
|
||||
---
|
||||
|
||||
## Tags
|
||||
### About
|
||||
{: .-intro}
|
||||
|
||||
Riot is a UI library for JavaScript.
|
||||
|
||||
- <https://riot.js.org/>
|
||||
|
||||
### Tags
|
||||
|
||||
```js
|
||||
/* tag-name.tag */
|
||||
|
@ -25,7 +32,7 @@ layout: default-ad
|
|||
<script>riot.mount('tag-name', { title: 'my app', ... })</script>
|
||||
```
|
||||
|
||||
## Expressions
|
||||
### Expressions
|
||||
|
||||
```
|
||||
{value}
|
||||
|
@ -70,6 +77,8 @@ riot.update() // update all
|
|||
|
||||
## Nesting
|
||||
|
||||
### Nesting
|
||||
|
||||
```
|
||||
<my-tag>
|
||||
<child></child>
|
||||
|
@ -88,6 +97,8 @@ riot.update() // update all
|
|||
|
||||
## Nested HTML
|
||||
|
||||
### Yield
|
||||
|
||||
```js
|
||||
<yield/>
|
||||
```
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
---
|
||||
title: Rspec-rails
|
||||
category: Ruby
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### About
|
||||
{: .-intro}
|
||||
|
||||
RSpec is a Ruby library for testing. [rspec-rails](https://github.com/rspec/rspec-rails) is its Rails integration.
|
||||
|
||||
- <https://rspec.info/>
|
||||
- <https://github.com/rspec/rspec-rails>
|
||||
|
||||
### Spec tasks
|
||||
|
||||
rake spec:controllers
|
||||
|
|
8
rspec.md
8
rspec.md
|
@ -1,8 +1,16 @@
|
|||
---
|
||||
title: RSpec
|
||||
category: Ruby
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### About
|
||||
{: .-intro}
|
||||
|
||||
RSpec is a Ruby library for testing.
|
||||
|
||||
- <https://rspec.info/>
|
||||
|
||||
### Invoking tests
|
||||
|
||||
```sh
|
||||
|
|
8
rst.md
8
rst.md
|
@ -1,8 +1,16 @@
|
|||
---
|
||||
title: ReStructuredText
|
||||
category: Markup
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### About
|
||||
{: .-intro}
|
||||
|
||||
ReStructuredText is a markup language for writing documents.
|
||||
|
||||
- <https://en.wikipedia.org/wiki/ReStructuredText>
|
||||
|
||||
### Comments
|
||||
|
||||
.. @theme 2010
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
---
|
||||
title: Sequel
|
||||
category: Ruby libraries
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### About
|
||||
{: .-intro}
|
||||
|
||||
Sequel is a database toolkit for Ruby.
|
||||
|
||||
- <https://github.com/jeremyevans/sequel>
|
||||
|
||||
### Open a database
|
||||
|
||||
require 'rubygems'
|
||||
|
|
10
sequelize.md
10
sequelize.md
|
@ -1,8 +1,16 @@
|
|||
---
|
||||
title: Sequelize
|
||||
category: Ruby libraries
|
||||
category: JavaScript libraries
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### About
|
||||
{: .-intro}
|
||||
|
||||
Sequelize is an ORM for JavaScript.
|
||||
|
||||
- <https://sequelize.org/>
|
||||
|
||||
### API
|
||||
|
||||
sequelize.sync().done -> ...
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
---
|
||||
title: Sinon-chai
|
||||
category: JavaScript libraries
|
||||
layout: default-ad
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
* [Sinon-chai](https://github.com/domenic/sinon-chai)
|
||||
### About
|
||||
{: .-intro}
|
||||
|
||||
* [Sinon-chai](https://github.com/domenic/sinon-chai)
|
||||
|
||||
### Initialization
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Social media images
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### Facebook
|
||||
|
@ -22,4 +23,4 @@ title: Social media images
|
|||
|
||||
### References
|
||||
|
||||
* https://developers.facebook.com/docs/plugins/checklist/
|
||||
* <https://developers.facebook.com/docs/plugins/checklist/>
|
||||
|
|
22
spine.md
22
spine.md
|
@ -1,11 +1,21 @@
|
|||
---
|
||||
title: Spine
|
||||
category: JavaScript libraries
|
||||
vim: ft=python
|
||||
layout: 2017/sheet
|
||||
tags: [Outdated]
|
||||
---
|
||||
|
||||
## Models
|
||||
|
||||
### About
|
||||
{: .-intro}
|
||||
|
||||
Spine is an MVC framework for JavaScript.
|
||||
|
||||
- <https://spine.github.io/>
|
||||
|
||||
### Models
|
||||
|
||||
class User extends Spine.Model
|
||||
@configure "User", "name", "address"
|
||||
|
||||
|
@ -128,6 +138,8 @@ vim: ft=python
|
|||
|
||||
## Ajax
|
||||
|
||||
### Ajax
|
||||
|
||||
class User extends Spine.Model
|
||||
@extend Spine.Model.Ajax
|
||||
|
||||
|
@ -173,11 +185,3 @@ vim: ft=python
|
|||
photo = Photo.create(album: album)
|
||||
photo.album()
|
||||
photo.album_id
|
||||
|
||||
|
||||
### See
|
||||
|
||||
* http://spinejs.com/api/index
|
||||
* http://spinejs.com/api/models
|
||||
* http://spinejs.com/docs/ajax
|
||||
* http://spinejs.com/docs/relations
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: Superagent
|
||||
category: JavaScript libraries
|
||||
updated: 2018-04-21
|
||||
prism_languages: [javascript]
|
||||
layout: 2017/sheet
|
||||
tags:
|
||||
- WIP
|
||||
---
|
||||
|
|
5
tmux.md
5
tmux.md
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: tmux
|
||||
category: CLI
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### Commands
|
||||
|
@ -82,6 +83,8 @@ See `message-command-style` in the man page.
|
|||
|
||||
### Attribute/colors
|
||||
|
||||
| Key | Description |
|
||||
| --- | --- |
|
||||
| `#[fg=1]` | standard color |
|
||||
| `#[fg=yellow]` | yellow |
|
||||
| `#[bold]` | bold |
|
||||
|
@ -103,6 +106,8 @@ See `message-command-style` in the man page.
|
|||
|
||||
### Variables
|
||||
|
||||
| Key | Description |
|
||||
| --- | --- |
|
||||
| `#(date)` | shell command |
|
||||
| `#I` | window index |
|
||||
| `#S` | session name |
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
---
|
||||
title: TypeScript
|
||||
category: JavaScript libraries
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### About
|
||||
|
||||
TypeScript is just like ES2015 with type-checking. All ES2015 (classes, etc) should work.
|
||||
|
||||
## Basic types
|
||||
### Basic types
|
||||
|
||||
```ts
|
||||
any
|
||||
|
@ -40,7 +43,7 @@ enum Color {
|
|||
let c: Color = Color.Green
|
||||
```
|
||||
|
||||
## Declarations
|
||||
### Declarations
|
||||
|
||||
```ts
|
||||
let isDone: boolean
|
||||
|
@ -129,6 +132,8 @@ interface User {
|
|||
|
||||
## Type aliases
|
||||
|
||||
### Type aliases
|
||||
|
||||
```ts
|
||||
type Name = string | string[]
|
||||
```
|
||||
|
|
9
umdjs.md
9
umdjs.md
|
@ -1,8 +1,13 @@
|
|||
---
|
||||
title: Universal JS module loader
|
||||
category: JavaScript libraries
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### Reference
|
||||
|
||||
* <https://github.com/umdjs/umd>
|
||||
|
||||
### [With dependency](https://github.com/umdjs/umd/blob/master/amdWebGlobal.js)
|
||||
|
||||
~~~ js
|
||||
|
@ -56,7 +61,3 @@ category: JavaScript libraries
|
|||
exports.action = function () {};
|
||||
}));
|
||||
~~~
|
||||
|
||||
### Reference
|
||||
|
||||
* https://github.com/umdjs/umd
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Underscore-string
|
||||
category: JavaScript libraries
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### Usage
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
---
|
||||
title: Unicode symbols
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### Symbols
|
||||
|
||||
✈ \u2708 airplane
|
||||
❄ \u2744 snowflake
|
||||
⚑ \u2691 flag
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Vim digraphs
|
||||
category: Vim
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### Typing digraphs in insert mode
|
||||
|
|
|
@ -3,6 +3,7 @@ title: Vim Easyalign
|
|||
html_class: key-codes
|
||||
hljs_languages: [vim]
|
||||
category: Vim
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
## Command mode
|
||||
|
|
|
@ -2,11 +2,16 @@
|
|||
title: Vim-rails
|
||||
category: Vim
|
||||
html_class: key-codes
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
Alternate files
|
||||
---------------
|
||||
|
||||
### Alternate files
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `:A` | alternate file (test) |
|
||||
| `:R` | related file (controller/view) |
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
---
|
||||
title: Vimscript functions
|
||||
category: Vim
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
Dictionaries
|
||||
------------
|
||||
## Dictionaries and lists
|
||||
|
||||
### Dictionaries
|
||||
|
||||
```vim
|
||||
let colors = {
|
||||
|
@ -39,8 +41,7 @@ for key in keys(mydict)
|
|||
endfor
|
||||
```
|
||||
|
||||
Lists
|
||||
-----
|
||||
### Lists
|
||||
|
||||
```vim
|
||||
let mylist = [1, two, 3, "four"]
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Vimscript snippets
|
||||
category: Vim
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### Bind function to key and command
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
---
|
||||
title: Virtual-dom
|
||||
category: JavaScript libraries
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### About
|
||||
|
||||
See <https://www.npmjs.com/package/virtual-dom>
|
||||
|
||||
### Example
|
||||
|
||||
```js
|
||||
var h = require('virtual-dom/h')
|
||||
var diff = require('virtual-dom/diff')
|
||||
|
|
3
vows.md
3
vows.md
|
@ -1,8 +1,11 @@
|
|||
---
|
||||
title: Vows
|
||||
category: JavaScript libraries
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### About vows
|
||||
|
||||
* [Vowsjs.org](http://vowsjs.org/)
|
||||
|
||||
### CoffeeScript usage
|
||||
|
|
Loading…
Reference in New Issue