Formatting: update formatting of 20+ files (#1490)

This commit is contained in:
Rico Sta. Cruz 2020-07-03 22:47:47 +10:00 committed by GitHub
parent 87ed01b739
commit 969967363f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 478 additions and 304 deletions

19
ansi.md
View File

@ -1,14 +1,20 @@
--- ---
title: Ansi codes title: Ansi codes
category: CLI category: CLI
layout: 2017/sheet
intro: |
Quick reference to ANSI color codes.
--- ---
Format ### Format
```
\033[#m \033[#m
```
Where: ### ANSI codes
```
0 clear 0 clear
1 bold 1 bold
4 underline 4 underline
@ -23,9 +29,11 @@ Where:
0;0H move cursor to 0;0 0;0H move cursor to 0;0
1A move up 1 line 1A move up 1 line
```
Colors ### Colors
```
0 black 0 black
1 red 1 red
2 green 2 green
@ -34,8 +42,11 @@ Colors
5 magenta 5 magenta
6 cyan 6 cyan
7 white 7 white
```
Stuff ### Bash utilities
```sh
hide_cursor() { printf "\e[?25l"; } hide_cursor() { printf "\e[?25l"; }
show_cursor() { printf "\e[?25h"; } show_cursor() { printf "\e[?25h"; }
```

61
atom.md
View File

@ -5,14 +5,13 @@ layout: 2017/sheet
updated: 2017-09-20 updated: 2017-09-20
--- ---
Shortcuts ## Shortcuts
---------
{: .-three-column} {: .-three-column}
### Tree ### Tree
| Shortcut | Description | | Shortcut | Description |
| --- | --- | | -------- | ------------------- |
| `⌘\` | Toggle tree | | `⌘\` | Toggle tree |
| `⌘⇧\` | Reveal current file | | `⌘⇧\` | Reveal current file |
{: .-shortcuts} {: .-shortcuts}
@ -20,14 +19,14 @@ Shortcuts
### Comments ### Comments
| Shortcut | Description | | Shortcut | Description |
| --- | --- | | -------- | --------------- |
| `⌘/` | Toggle comments | | `⌘/` | Toggle comments |
{: .-shortcuts} {: .-shortcuts}
### View ### View
| Shortcut | Description | | Shortcut | Description |
| --- | --- | | -------- | ---------------------- |
| `⌘k` `←` | Split pane to the left | | `⌘k` `←` | Split pane to the left |
| --- | --- | | --- | --- |
| `⌘⌥=` | Grow pane | | `⌘⌥=` | Grow pane |
@ -38,6 +37,8 @@ Shortcuts
### Bracket matcher ### Bracket matcher
| Shortcut | Description |
| -------- | ------------------------------ |
| `^m` | Go to matching bracket | | `^m` | Go to matching bracket |
| `^]` | Remove brackets from selection | | `^]` | Remove brackets from selection |
| `^⌘m` | Select inside brackets | | `^⌘m` | Select inside brackets |
@ -46,6 +47,8 @@ Shortcuts
### Symbols view ### Symbols view
| Shortcut | Description |
| -------- | -------------------------------- |
| `^⌥↓` | Jump to declaration under cursor | | `^⌥↓` | Jump to declaration under cursor |
| `^⇧r` | Show tags | | `^⇧r` | Show tags |
{: .-shortcuts} {: .-shortcuts}
@ -62,34 +65,34 @@ See: [Symbols view](https://atom.io/packages/symbols-view)
### Editing ### Editing
| Shortcut | Description | Shortcut | Description |
| --- | --- | -------- | -------------- |
| `⌘d` | Select word | `⌘d` | Select word |
| `⌘l` | Select line | `⌘l` | Select line |
| --- | --- | --- | --- |
| `⌘↓` | Move line down | `⌘↓` | Move line down |
| `⌘↑` | Move line up | `⌘↑` | Move line up |
| --- | --- | --- | --- |
| `⌘⏎` | New line below | `⌘⏎` | New line below |
| `⌘⇧⏎` | New line above | `⌘⇧⏎` | New line above |
| --- | --- | --- | --- |
| `⌘⇧k` | Delete line | `⌘⇧k` | Delete line |
| `⌘⇧d` | Duplicate line | `⌘⇧d` | Duplicate line |
{: .-shortcuts} {: .-shortcuts}
### Project ### Project
| Shortcut | Description | Shortcut | Description |
| --- | --- | -------- | ----------------------- |
| `⌘⇧p` | Command palette | `⌘⇧p` | Command palette |
| `⌘⇧a` | Add project folder | `⌘⇧a` | Add project folder |
| --- | --- | --- | --- |
| `⌘n` | New file | `⌘n` | New file |
| `⌘⇧n` | New window | `⌘⇧n` | New window |
| --- | --- | --- | --- |
| `⌘f` | Find in file | `⌘f` | Find in file |
| `⌘⇧f` | Find in project | `⌘⇧f` | Find in project |
| `⌘t` | Search files in project | `⌘t` | Search files in project |
{: .-shortcuts} {: .-shortcuts}
## Notes ## Notes

View File

@ -1,21 +0,0 @@
# bookshelf-contrib.Scopes
#
class Books
scopes:
published: (q) -> q.where(published: true)
Books.published().fetchAll()
# bookshelf-contrib.QueryProxy
#
Books.query().where(published: true)
Books.where(published: true)
# bookshelf-contrib.Migration
class Migration
up: ->
down: ->

View File

@ -1,25 +1,34 @@
--- ---
title: Cordova title: Apache Cordova
layout: 2017/sheet
intro: |
A quick reference to common [Apache Cordova](https://cordova.apache.org/) commands.
--- ---
### Common commands
```
cordova plugin ls cordova plugin ls
cordova plugin search facebook cordova plugin search facebook
cordova plugin add com.phonegap.plugins.facebookconnect cordova plugin add com.phonegap.plugins.facebookconnect
```
```
cordova platform add ios cordova platform add ios
cordova platform ls cordova platform ls
cordova platform update ios cordova platform update ios
cordova platform check cordova platform check
```
### Some plugins ### Common plugins
You'll likely need these: Some commonly-used plugins:
* [org.apache.cordova.console](https://github.com/apache/cordova-plugin-console) - [org.apache.cordova.console](https://github.com/apache/cordova-plugin-console)
* [org.apache.cordova.inappbrowser](https://github.com/apache/cordova-plugin-inappbrowser) - [org.apache.cordova.inappbrowser](https://github.com/apache/cordova-plugin-inappbrowser)
* [org.apache.cordova.statusbar](https://github.com/apache/cordova-plugin-statusbar) - [org.apache.cordova.statusbar](https://github.com/apache/cordova-plugin-statusbar)
* org.apache.cordova.splashscreen - org.apache.cordova.splashscreen
Also: Also:
* com.phonegap.plugins.facebookconnect - com.phonegap.plugins.facebookconnect

View File

@ -1,9 +0,0 @@
---
title: Cryptography
---
* [PBKDF2](http://en.wikipedia.org/wiki/PBKDF2) - password-based key derivation
function
* [HMAC](http://en.wikipedia.org/wiki/HMAC) - Hash-based message authentication
code

View File

@ -1,14 +1,26 @@
--- ---
title: Freenode title: Freenode
layout: 2017/sheet
tags: [WIP]
--- ---
### irc.freenode.net ### IRC server
```
irc.freenode.net
```
### NickServ commands
```
/msg nickserv identify [nick] <password> /msg nickserv identify [nick] <password>
/msg nickserv info <nick> /msg nickserv info <nick>
```
### Add a nick ### Add a nick
```
/nick newnick /nick newnick
/msg nickserv identify <oldnick> <password> /msg nickserv identify <oldnick> <password>
/msg nickserv group /msg nickserv group
```

View File

@ -1,12 +1,26 @@
--- ---
title: Google Webfonts title: Google Webfonts
layout: 2017/sheet
intro: |
Short snippets on using [Google Webfonts](https://google.com/fonts) in a web page.
--- ---
### Link tag ### Link tag
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> <!-- prettier-ignore -->
```html
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css" />
```
### CSS import ### CSS import
@import url(http://fonts.googleapis.com/css?family=Open+Sans); <!-- prettier-ignore -->
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,400italic|Montserrat:400,700); ```css
/* One font */
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700');
/* Combining multiple fonts */
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400italic|Montserrat:400,700'');
```
Great for using with [Codepen.io](https://codepen.io/) or similar websites!

View File

@ -1,31 +1,43 @@
--- ---
title: Imagemagick title: Imagemagick
layout: 2017/sheet
intro: |
A quick reference for common [Imagemagick](https://www.imagemagick.org) commands and switches.
--- ---
### Stuff ### Common options
-resize 100x40 | Option | Description |
-crop 40x30+10+10 # (width)x(height)+(x)+y | ------------------- | ------------------------------- |
-crop 40x30-10-10 # (width)x(height)+(x)+y | `-resize 100x40` | Resize to a dimension |
-flip # vertical | `-crop 40x30+10+10` | (width)x(height)+(x)+y |
-flop # horizontal | `-crop 40x30-10-10` | (width)x(height)+(x)+y |
-transpose # flip vertical + rotate 90deg | `-flip` | Vertical |
-transverse # flip horizontal + rotate 270deg | `-flop` | Horizontal |
-trim # trim image edges | `-transpose` | Flip vertical + rotate 90deg |
-rotate 90 | `-transverse` | Flip horizontal + rotate 270deg |
| `-trim` | Trim image edges |
| `-rotate 90` | Rotate 90 degrees |
### Resize to fit ### Resize to fit
```sh
convert input.jpg -resize 80x80^ -gravity center -extent 80x80 icon.png convert input.jpg -resize 80x80^ -gravity center -extent 80x80 icon.png
```
### Convert all images to another format ### Convert all images to another format
```sh
mogrify -format jpg -quality 85 *.png mogrify -format jpg -quality 85 *.png
```
### Make a pdf ### Make a pdf
```sh
convert *.jpg hello.pdf convert *.jpg hello.pdf
```
### References ### References
* http://www.noah.org/wiki/ImageMagick - <http://www.noah.org/wiki/ImageMagick>
- <https://www.imagemagick.org/>

View File

@ -1,8 +1,12 @@
--- ---
title: jQuery CDN title: jQuery CDN
category: JavaScript libraries category: JavaScript libraries
tags: [Archived]
layout: 2017/sheet
--- ---
### Google jQuery ### Google jQuery
```html
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
```

View File

@ -1,16 +1,25 @@
--- ---
title: assert title: assert
category: Node.js category: Node.js
layout: 2017/sheet
--- ---
### Assertions
```js
assert(val) assert(val)
assert.equal(actual, expected) assert.equal(actual, expected)
assert.notEqual(a, e) assert.notEqual(a, e)
```
```js
assert.deepEqual(a, e) assert.deepEqual(a, e)
assert.notDeepEqual(a, e) assert.notDeepEqual(a, e)
```
```js
assert.throws(fn) assert.throws(fn)
```
### References ### References

View File

@ -1,18 +1,33 @@
--- ---
title: path title: Node.js path API
category: Node.js category: Node.js
layout: 2017/sheet
intro: |
Quick reference to the [Node.js path API](https://nodejs.org/api/path.html).
--- ---
fs.realpath('/etc/passwd', function(err, path) { /* "/private/etc/passwd" */ ### Functions
});
dir = path.join('etc', 'passwd'); ```js
dir = path.resolve('/etc', 'passwd', '..', 'var'); const fs = require('fs')
fs.realpath('/etc/passwd', function (err, path) {
path // => "/private/etc/passwd"
})
```
```js
const path = require('path')
dir = path.join('etc', 'passwd')
dir = path.resolve('/etc', 'passwd', '..', 'var')
```
```js
path.dirname('/etc/passwd') // => "/etc" path.dirname('/etc/passwd') // => "/etc"
path.basename('/etc/passwd') // => "passwd" path.basename('/etc/passwd') // => "passwd"
path.basename('/etc/rc.d', '.d') // => "rc" path.basename('/etc/rc.d', '.d') // => "rc"
```
### References ### References
- http://nodejs.org/api/path.html - https://nodejs.org/api/path.html

View File

@ -19,6 +19,7 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.10.2", "@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2", "@babel/preset-env": "^7.10.2",
"@rstacruz/prettier-plugin-markdown-code-fences": "^1.0.0",
"jest": "26.0.1", "jest": "26.0.1",
"jest-html": "1.5.0", "jest-html": "1.5.0",
"netlify-plugin-minify-html": "^0.2.3", "netlify-plugin-minify-html": "^0.2.3",

View File

@ -1,7 +1,12 @@
--- ---
title: Phusion Passenger title: Phusion Passenger
tags: [WIP]
layout: 2017/sheet
--- ---
### Enabling Phusion passenger
```
server { server {
listen 80; listen 80;
server_name www.yourhost.com; server_name www.yourhost.com;
@ -9,4 +14,6 @@ title: Phusion Passenger
passenger_enabled on; passenger_enabled on;
autoindex on; # Show directory listings autoindex on; # Show directory listings
} }
```
This is an example nginx configuration.

View File

@ -1,13 +1,28 @@
--- ---
title: Premailer title: Premailer
layout: 2017/sheet
tags: [WIP]
intro: |
[Premailer](https://github.com/premailer/premailer/) is a Ruby library that inlines CSS into HTML.
--- ---
### Custom CSS properties
-premailer-width <!-- prettier-ignore -->
Available on table, th and td elements ```css
-premailer-height table, th, td {
Available on table, tr, th and td elements /* Available on table, th and td elements */
-premailer-cellpadding -premailer-width: 32px;
Available on table elements }
-premailer-cellspacing
Available on table elements table, tr, th, td {
/* Available on table, tr, th and td elements */
-premailer-height: 32px;
}
table {
/* Available on table elements */
-premailer-cellpadding: 32px;
-premailer-cellspacing: 32px;
}
```

View File

@ -1,32 +1,47 @@
--- ---
title: Qunit title: Qunit
category: JavaScript libraries category: JavaScript libraries
layout: 2017/sheet
intro: |
A quick reference for the [QUnit](https://yarnpkg.com/package/qunit) testing library in JavaScript.
--- ---
QUnit.module('a'); ```js
QUnit.test('ok', function (t) { ... }); QUnit.module('a')
QUnit.test('ok', function (t) {
/* ... */
})
```
### Hooks ### Hooks
#### Each test
```js
// each test // each test
QUnit.testStart(function) QUnit.testStart(function)
QUnit.testEnd(function) QUnit.testEnd(function)
```
```js
// each module // each module
QUnit.moduleStart(function) QUnit.moduleStart(function)
QUnit.moduleEnd(function) QUnit.moduleEnd(function)
```
```js
// all // all
QUnit.begin(function) QUnit.begin(function)
QUnit.done(function) QUnit.done(function)
```
### Assertions ### Assertions
```js
t.equal(actual, expected) t.equal(actual, expected)
t.deepEqual(actual, expected) t.deepEqual(actual, expected)
t.strictEqual(actual, expected) t.strictEqual(actual, expected)
t.propEqual(actual, expected) t.propEqual(actual, expected)
t.notEqual(actual, expected)
t.notEqual
t.expect(amount) t.expect(amount)
```

View File

@ -1,24 +0,0 @@
---
title: Rails gems
category: Rails
---
### Rico's preferred rails gems
Development:
gem 'spring' # code reloading
gem 'letter_opener'
gem 'better_errors'
gem 'meta-tags'
gem 'guard-rspec'
Prod:
gem 'kaminari' # pagination
gem 'devise'
gem 'meta-tags', require: 'meta_tags'
gem 'friendly_id'
gem 'bourbon'
gem 'neat'
gem 'turbolinks'

View File

@ -1,25 +1,37 @@
--- ---
title: Ruby 2.1 title: Ruby 2.1
category: Ruby category: Ruby
layout: 2017/sheet
tags: [Archived]
intro: |
Quick reference to the [new features in Ruby 2.1](https://www.ruby-lang.org/).
--- ---
### Named arguments with defaults ### Named arguments with defaults
```ruby
# length is required # length is required
def pad(num, length:, char: "0") def pad(num, length:, char: "0")
num.to_s.rjust(length, char) num.to_s.rjust(length, char)
end end
```
```ruby
pad(42, length: 6) #=> "000042" pad(42, length: 6) #=> "000042"
pad(42) #=> #<ArgumentError: missing keyword: length> pad(42) #=> #<ArgumentError: missing keyword: length>
```
### Module.prepend ### Module.prepend
prepend(Module.new do ```ruby
prepend(
Module.new do
define_method ... define_method ...
end) end
)
```
### References ### References
* http://globaldev.co.uk/2013/03/ruby-2-0-0-in-detail - http://globaldev.co.uk/2013/03/ruby-2-0-0-in-detail
* http://globaldev.co.uk/2014/05/ruby-2-1-in-detail - http://globaldev.co.uk/2014/05/ruby-2-1-in-detail

View File

@ -1,21 +1,40 @@
--- ---
title: Rubygems title: Rubygems
category: Ruby category: Ruby
layout: 2017/sheet
intro: |
A quick reference to common [rubygems](https://rubygems.org) CLI commands.
--- ---
### Building and publishing
```sh
gem build *.gemspec # Build a gem gem build *.gemspec # Build a gem
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
```
### Querying
```sh
gem owner foogem -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
gem search -r rails # [remote] Search for gems gem search -r rails # [remote] Search for gems
```
### Opening a gem
```sh
# https://github.com/fnando/gem-open # https://github.com/fnando/gem-open
gem open foogem gem open foogem
GEM_EDITOR="vim" gem open foogem GEM_EDITOR="vim" gem open foogem
```
### Changing to a directory
```sh
cd $(basename `gem which rake`) # Go to a gem's path cd $(basename `gem which rake`) # Go to a gem's path
```

View File

@ -1,11 +1,20 @@
--- ---
title: Siege title: Siege
category: Others category: Others
layout: 2017/sheet
intro: |
[Siege](https://www.joedog.org/siege-home/) is an HTTP and HTTPS load testing tool.
--- ---
### Basic usage
```sh
siege -b -c=10 -t=5m "http://..."
``` ```
siege -b -c=10 -t=5m http://...
``` ### Options
#### Repetitions
``` ```
-c, --concurrent=N -c, --concurrent=N
@ -13,24 +22,28 @@ siege -b -c=10 -t=5m http://...
-r, --reps=N -r, --reps=N
``` ```
#### Modes
``` ```
-i, --internet Hit URLs randomly -i, --internet Hit URLs randomly
-b, --benchmark No delay between requests -b, --benchmark No delay between requests
``` ```
### Configuration #### Configuration
``` ```
-f, --file=FILE load urls.txt -f, --file=FILE load urls.txt
-R, --rc=FILE load siegerc -R, --rc=FILE load siegerc
``` ```
> Also see: [siegerc](https://gist.github.com/stansmet/3067988) #### Headers
### Headers
``` ```
-H, --header="Cookie: foo=bar" -H, --header="Cookie: foo=bar"
-A, --user-agent="Mozilla" -A, --user-agent="Mozilla"
-T, --content-type="text/html" -T, --content-type="text/html"
``` ```
### References
Also see: [siegerc](https://gist.github.com/stansmet/3067988)

View File

@ -1,7 +1,11 @@
--- ---
title: SimpleForm title: SimpleForm
layout: 2017/sheet
tags: [WIP]
--- ---
### Inputs
```ruby ```ruby
<%= f.input :email, required: false, autofocus: true %> <%= f.input :email, required: false, autofocus: true %>
<%= f.input :password, required: false %> <%= f.input :password, required: false %>
@ -9,7 +13,8 @@ title: SimpleForm
<%= f.button :submit, "Sign in" %> <%= f.button :submit, "Sign in" %>
``` ```
### Adding a wrapper
```ruby ```ruby
simple_form_for @x, simple_form_for @x, wrapper: :small
wrapper: :small
``` ```

View File

@ -1,35 +1,54 @@
--- ---
title: Spreadsheet functions title: Spreadsheet functions
tags: [WIP]
layout: 2017/sheet
--- ---
### If ### If
```
=IF(test, then, else) =IF(test, then, else)
=IF(EQ(A1, "paid"), "true", "false") =IF(EQ(A1, "paid"), "true", "false")
```
### Comparators ### Comparators
=EQ(a,b) NE() ```
=GT() GTE() LT() LTE() =EQ(a,b)
=NE(a,b)
=GT(a,b)
=GTE(a,b)
=LT(a,b)
=LTE(a,b)
```
### Math ### Math
```
=POW(2, 32) # 2^32 =POW(2, 32) # 2^32
=SIN() ACOS() etc =SIN() ACOS() etc
=CEILING(n,sig,mode) =CEILING(n,sig,mode)
=FLOOR(n,sig,mode) =FLOOR(n,sig,mode)
=INT(n) =INT(n)
```
```
=SUM(range) =SUM(range)
```
```
=SUMIF(range, criteria, sum_range) =SUMIF(range, criteria, sum_range)
=SUMIF(A1:A5, ">300", B1:B5) # if A# is >300, use B# =SUMIF(A1:A5, ">300", B1:B5) # if A# is >300, use B#
```
### Core ### Core
```
=TO_DATE(number) =TO_DATE(number)
```
### Vlook ### Vlook
```
=VLOOKUP(value, range, column_index) =VLOOKUP(value, range, column_index)
```

View File

@ -54,14 +54,18 @@ category: Vim
### `:EasyAlign = dr` (delimiter_align right) ### `:EasyAlign = dr` (delimiter_align right)
```
apple = 1 apple = 1
banana += apple banana += apple
cake ||= banana cake ||= banana
```
### `:EasyAlign :` (for json or yaml) ### `:EasyAlign :` (for json or yaml)
```
url: jdbc:mysql://localhost/test url: jdbc:mysql://localhost/test
database: test database: test
```
### `:EasyAlign *|` (markdown tables) ### `:EasyAlign *|` (markdown tables)
@ -71,8 +75,7 @@ category: Vim
| `2` | on 2nd occurrence (and so on) | | `2` | on 2nd occurrence (and so on) |
``` ```
Interactive mode ## Interactive mode
----------------
| `{Visual}` `⏎` | activate for selection | | `{Visual}` `⏎` | activate for selection |
| `ga` `{motion}` | activate for motion/text object | | `ga` `{motion}` | activate for motion/text object |
@ -90,11 +93,10 @@ Then press options (if available), then a delimiter.
### Example ### Example
* `gaip` `<ctrl-l>` `8⏎` `=` - puts 8 spaces before the equal sign - `gaip` `<ctrl-l>` `8⏎` `=` - puts 8 spaces before the equal sign
Also see ## Also see
--------
* [vim-easy-align](https://github.com/junegunn/vim-easy-align) - [vim-easy-align](https://github.com/junegunn/vim-easy-align)
* [Examples](https://github.com/junegunn/vim-easy-align#examples) - [Examples](https://github.com/junegunn/vim-easy-align#examples)
* [Alignment options](https://github.com/junegunn/vim-easy-align#alignment-options) - [Alignment options](https://github.com/junegunn/vim-easy-align#alignment-options)

View File

@ -1,17 +1,35 @@
--- ---
title: Weinre title: Weinre
category: JavaScript libraries category: JavaScript libraries
layout: 2017/sheet
tags: [Archived]
intro: |
[weinre](https://www.npmjs.com/package/weinre) is a remote Web inspector. Note that it has been deprecated since 2016.
--- ---
* [Weinre](http://people.apache.org/~pmuellr/weinre/) ### Usage
Install: #### Install:
```
$ npm install -g weinre $ npm install -g weinre
```
Start the server: #### Start the server:
```
$ weinre --boundHost 0.0.0.0 $ weinre --boundHost 0.0.0.0
$ open http://localhost:8080 $ open http://localhost:8080
```
### HTML to inject
<!--prettier-ignore -->
```html
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.async=1;js.src='http://'+location.hostname+':8080/target/target-script-min.js#anonymous';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weinre');</script> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.async=1;js.src='http://'+location.hostname+':8080/target/target-script-min.js#anonymous';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weinre');</script>
```
### References
- [Weinre](http://people.apache.org/~pmuellr/weinre/)

View File

@ -1170,6 +1170,11 @@
"@parcel/utils" "^1.11.0" "@parcel/utils" "^1.11.0"
physical-cpu-count "^2.0.0" physical-cpu-count "^2.0.0"
"@rstacruz/prettier-plugin-markdown-code-fences@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@rstacruz/prettier-plugin-markdown-code-fences/-/prettier-plugin-markdown-code-fences-1.0.0.tgz#b432eed2db4726abe2c3efaa75c12322976a8ab6"
integrity sha512-p/P6BH6tGoCbgMemimUIXJSwi5enZ/HhLupATlPqJmjal00gociP1lbbUQEs97PWjLsgmY3kKu30yKzMSIs0mA==
"@sinonjs/commons@^1.7.0": "@sinonjs/commons@^1.7.0":
version "1.8.0" version "1.8.0"
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.0.tgz#c8d68821a854c555bba172f3b06959a0039b236d" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.0.tgz#c8d68821a854c555bba172f3b06959a0039b236d"

10
znc.md
View File

@ -1,9 +1,13 @@
--- ---
title: ZNC bouncer title: ZNC bouncer
layout: 2017/sheet
intro: |
A quick reference to the [ZNC](https://znc.bg) IRC bouncer's common commands.
--- ---
## Start ## Start
```
/msg *status addserver irc.undernet.org [6667] /msg *status addserver irc.undernet.org [6667]
/msg *status connect /msg *status connect
@ -14,19 +18,23 @@ title: ZNC bouncer
/msg *status loadmod clientnotify # Notifies when another client logs /msg *status loadmod clientnotify # Notifies when another client logs
/msg *status loadmod keepnick /msg *status loadmod keepnick
/msg *status loadmod kickrejoin /msg *status loadmod kickrejoin
```
## Away ## Away
```
/msg *status loadmod away /msg *status loadmod away
/msg *away away /msg *away away
/msg *away back /msg *away back
/msg *away show #=> Show messages /msg *away show #=> Show messages
/msg *away delete all /msg *away delete all
```
## Watch ## Watch
```
/msg *status loadmod watch /msg *status loadmod watch
/msg *watch list /msg *watch list
/msg *watch add * *watch *rico* /msg *watch add * *watch *rico*
/msg *watch add * *watch *%nick%* /msg *watch add * *watch *%nick%*
```