Update more sheets
This commit is contained in:
parent
3721e05a61
commit
b5d973e0de
|
@ -9,6 +9,6 @@
|
|||
<abbr class='attribute-peg -new-layout hint--bottom' data-hint='New layout!'><span></span></abbr>
|
||||
{% endif %}
|
||||
|
||||
<span class='title'>{{ include.page.title }}</span>
|
||||
<span class='title'>{{ include.page.title }} {{ include.page.redirect_to }}</span>
|
||||
</span>
|
||||
</a>
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
---
|
||||
type: website
|
||||
---
|
||||
{% assign featured_pages = site.pages
|
||||
| where_exp: "page", "page.tags contains 'Featured'"
|
||||
%}
|
||||
{% assign recent_pages = site.pages
|
||||
| where_exp: "page", "page.updated"
|
||||
| where_exp: "page", "page.updated >= site.last_updated"
|
||||
%}
|
||||
{% include 2017/head.html %}
|
||||
|
||||
{% include 2017/top-nav.html page=page %}
|
||||
|
||||
<div class='SideAd'>
|
||||
|
@ -26,24 +32,18 @@ type: website
|
|||
</div>
|
||||
|
||||
<div class='pages-list'>
|
||||
{% for page in site.pages %}
|
||||
{% if page.tags contains 'Featured' %}
|
||||
{% for page in featured_pages %}
|
||||
{% include 2017/pages-list-item.html page=page class='item top-sheet' %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<h2 class='category item' data-js-searchable-header>
|
||||
<span>Recently updated</span>
|
||||
</h2>
|
||||
|
||||
{% for page in site.pages %}
|
||||
{% if page.updated %}
|
||||
{% if page.updated >= site.last_updated %}
|
||||
{% for page in recent_pages %}
|
||||
{% unless page.tags contains 'Featured' %}
|
||||
{% include 2017/pages-list-item.html page=page class='article item' %}
|
||||
{% endunless %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for category in site.category_names %}
|
||||
|
|
|
@ -1,78 +1,105 @@
|
|||
---
|
||||
title: CSS tricks
|
||||
category: CSS
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
### Heading kerning pairs and ligature
|
||||
|
||||
h1, h2, h3 { text-rendering: optimizeLegibility; }
|
||||
```css
|
||||
h1, h2, h3 { text-rendering: optimizeLegibility; }
|
||||
```
|
||||
|
||||
### Native-like iOS scrolling
|
||||
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-y: auto;
|
||||
```css
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-y: auto;
|
||||
```
|
||||
|
||||
### Gradient text
|
||||
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#333));
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
```css
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#333));
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
```
|
||||
|
||||
### Text stroke
|
||||
|
||||
/* http://www.webkit.org/blog/85/introducing-text-stroke/ */
|
||||
-webkit-text-stroke: 3px black;
|
||||
```css
|
||||
-webkit-text-stroke: 3px black;
|
||||
```
|
||||
|
||||
See: [Introducing text stroke](http://www.webkit.org/blog/85/introducing-text-stroke/)
|
||||
|
||||
### iOS Scrolling prevention
|
||||
|
||||
document.ontouchstart = (e) ->
|
||||
```css
|
||||
document.ontouchstart = (e) ->
|
||||
$pane = $(e.target).closest('.scrollable>div')
|
||||
if $pane.length is 0 or $pane[0].scrollHeight <= $pane.innerHeight()
|
||||
e.preventDefault()
|
||||
```
|
||||
|
||||
%ios-scrollable
|
||||
&, >div
|
||||
-webkit-overflow-scrolling: touch
|
||||
overflow: auto
|
||||
```scss
|
||||
%ios-scrollable {
|
||||
&, >div {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
>div
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
right: 0
|
||||
bottom: 0
|
||||
>div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Relevant in iOS6, but maybe not anymore.
|
||||
|
||||
### UIWebView optimizations
|
||||
|
||||
/* http://www.bitsandpix.com/entry/ios-webkit-uiwebview-remove-tapclick-highlightborder-with-css/ */
|
||||
/*
|
||||
http://www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
|
||||
*/
|
||||
|
||||
* {
|
||||
```css
|
||||
* {
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
-webkit-user-select: none; /* disable text select */
|
||||
-webkit-touch-callout: none; /* disable callout, image save panel (popup) */
|
||||
-webkit-tap-highlight-color: transparent; /* "turn off" link highlight */
|
||||
}
|
||||
}
|
||||
|
||||
a:focus {
|
||||
outline:0; // Firefox (remove border on link click)
|
||||
}
|
||||
a:focus {
|
||||
outline: 0; // Firefox (remove border on link click)
|
||||
}
|
||||
```
|
||||
|
||||
See: <http://www.bitsandpix.com/entry/ios-webkit-uiwebview-remove-tapclick-highlightborder-with-css/>
|
||||
|
||||
See: <http://www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/>
|
||||
|
||||
Browser hacks
|
||||
-------------
|
||||
{: .-three-column}
|
||||
|
||||
### Disclaimer
|
||||
|
||||
Not recommended, but here they are if you ever need them. Note that vendor
|
||||
prefixes may go away eventually.
|
||||
|
||||
### Mozilla-only
|
||||
|
||||
@-moz-document url-prefix() {
|
||||
```css
|
||||
@-moz-document url-prefix() {
|
||||
.box { color: blue; }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Webkit-only
|
||||
|
||||
@media all and (-webkit-min-device-pixel-ratio: 1) {
|
||||
}
|
||||
```css
|
||||
@media all and (-webkit-min-device-pixel-ratio: 1) {
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
---
|
||||
title: Dockerfile
|
||||
category: Devops
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
## Reference
|
||||
{: .-three-column}
|
||||
|
||||
### Inheritance
|
||||
|
||||
```
|
||||
|
@ -28,8 +32,9 @@ WORKDIR /myapp
|
|||
|
||||
### Onbuild
|
||||
|
||||
```docker
|
||||
ONBUILD RUN bundle install # when used with another file
|
||||
```bash
|
||||
ONBUILD RUN bundle install
|
||||
# when used with another file
|
||||
```
|
||||
|
||||
### Commands
|
||||
|
@ -39,6 +44,7 @@ EXPOSE 5900
|
|||
CMD ["bundle", "exec", "rails", "server"]
|
||||
```
|
||||
|
||||
### Reference
|
||||
## See also
|
||||
{: .-one-column}
|
||||
|
||||
- <https://docs.docker.com/engine/reference/builder/>
|
||||
|
|
94
rsync.md
94
rsync.md
|
@ -1,62 +1,84 @@
|
|||
---
|
||||
title: Rsync
|
||||
category: CLI
|
||||
layout: 2017/sheet
|
||||
---
|
||||
|
||||
rsync -avz ./src /dest
|
||||
### Basic example
|
||||
{: .-prime}
|
||||
|
||||
```bash
|
||||
rsync -avz ./src /dest
|
||||
```
|
||||
|
||||
### OSX
|
||||
|
||||
--exclude '.Trashes'
|
||||
--exclude '.Spotlight-V100'
|
||||
--exclude '.fseventsd'
|
||||
```bash
|
||||
--exclude '.Trashes'
|
||||
--exclude '.Spotlight-V100'
|
||||
--exclude '.fseventsd'
|
||||
```
|
||||
|
||||
### Options
|
||||
### Transfer options
|
||||
|
||||
Transfer:
|
||||
```bash
|
||||
-z, --compress
|
||||
-n, --dry-run
|
||||
```
|
||||
|
||||
-z, --compress
|
||||
-n, --dry-run
|
||||
### Display options
|
||||
|
||||
Display:
|
||||
|
||||
-q, --quiet
|
||||
-v, --verbose
|
||||
-h, --human-readable
|
||||
```bash
|
||||
-q, --quiet
|
||||
-v, --verbose
|
||||
-h, --human-readable
|
||||
--progress
|
||||
```
|
||||
|
||||
Skipping:
|
||||
### Skipping options
|
||||
|
||||
-u, --update # skip files newer on dest
|
||||
-c, --checksum # skip based on checksum, not mod-time & size
|
||||
```bash
|
||||
-u, --update # skip files newer on dest
|
||||
-c, --checksum # skip based on checksum, not mod-time & size
|
||||
```
|
||||
|
||||
Backups:
|
||||
### Backup options
|
||||
|
||||
-b, --backup # backup with suffix
|
||||
```bash
|
||||
-b, --backup # backup with suffix
|
||||
--suffix=SUFFIX # default ~ without --backup-dir
|
||||
|
||||
--backup-dir=DIR
|
||||
```
|
||||
|
||||
### Include
|
||||
### Include options
|
||||
|
||||
--exclude=PATTERN
|
||||
--include=PATTERN
|
||||
```bash
|
||||
--exclude=PATTERN
|
||||
--include=PATTERN
|
||||
```
|
||||
|
||||
--exclude-from=FILE
|
||||
--include-from=FILE
|
||||
--files-from=FILE # read list of filenames from FILe
|
||||
```bash
|
||||
--exclude-from=FILE
|
||||
--include-from=FILE
|
||||
--files-from=FILE # read list of filenames from FILe
|
||||
```
|
||||
|
||||
### Archive
|
||||
### Archive options
|
||||
|
||||
-a, --archive # archive (-rlptgoD)
|
||||
```bash
|
||||
-a, --archive # archive (-rlptgoD)
|
||||
```
|
||||
|
||||
-r, --recursive
|
||||
-l, --links # copy symlinks as links
|
||||
-p, --perms # preserve permissions
|
||||
-t, --times # preserve times
|
||||
-g, --group # preserve group
|
||||
-o, --owner # preserve owner
|
||||
-D # --devices --specials
|
||||
|
||||
--delete # Delete extra files
|
||||
```bash
|
||||
-r, --recursive
|
||||
-l, --links # copy symlinks as links
|
||||
-p, --perms # preserve permissions
|
||||
-t, --times # preserve times
|
||||
-g, --group # preserve group
|
||||
-o, --owner # preserve owner
|
||||
-D # --devices --specials
|
||||
```
|
||||
|
||||
```bash
|
||||
--delete # Delete extra files
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue