Update more sheets

This commit is contained in:
Rico Sta. Cruz 2017-08-30 05:52:27 +08:00
parent 3721e05a61
commit b5d973e0de
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
5 changed files with 151 additions and 96 deletions

View File

@ -9,6 +9,6 @@
<abbr class='attribute-peg -new-layout hint--bottom' data-hint='New layout!'><span></span></abbr> <abbr class='attribute-peg -new-layout hint--bottom' data-hint='New layout!'><span></span></abbr>
{% endif %} {% endif %}
<span class='title'>{{ include.page.title }}</span> <span class='title'>{{ include.page.title }} {{ include.page.redirect_to }}</span>
</span> </span>
</a> </a>

View File

@ -1,8 +1,14 @@
--- ---
type: website 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/head.html %}
{% include 2017/top-nav.html page=page %} {% include 2017/top-nav.html page=page %}
<div class='SideAd'> <div class='SideAd'>
@ -26,24 +32,18 @@ type: website
</div> </div>
<div class='pages-list'> <div class='pages-list'>
{% for page in site.pages %} {% for page in featured_pages %}
{% if page.tags contains 'Featured' %}
{% include 2017/pages-list-item.html page=page class='item top-sheet' %} {% include 2017/pages-list-item.html page=page class='item top-sheet' %}
{% endif %}
{% endfor %} {% endfor %}
<h2 class='category item' data-js-searchable-header> <h2 class='category item' data-js-searchable-header>
<span>Recently updated</span> <span>Recently updated</span>
</h2> </h2>
{% for page in site.pages %} {% for page in recent_pages %}
{% if page.updated %}
{% if page.updated >= site.last_updated %}
{% unless page.tags contains 'Featured' %} {% unless page.tags contains 'Featured' %}
{% include 2017/pages-list-item.html page=page class='article item' %} {% include 2017/pages-list-item.html page=page class='article item' %}
{% endunless %} {% endunless %}
{% endif %}
{% endif %}
{% endfor %} {% endfor %}
{% for category in site.category_names %} {% for category in site.category_names %}

View File

@ -1,78 +1,105 @@
--- ---
title: CSS tricks title: CSS tricks
category: CSS category: CSS
layout: 2017/sheet
--- ---
### Heading kerning pairs and ligature ### Heading kerning pairs and ligature
h1, h2, h3 { text-rendering: optimizeLegibility; } ```css
h1, h2, h3 { text-rendering: optimizeLegibility; }
```
### Native-like iOS scrolling ### Native-like iOS scrolling
-webkit-overflow-scrolling: touch; ```css
overflow-y: auto; -webkit-overflow-scrolling: touch;
overflow-y: auto;
```
### Gradient text ### Gradient text
background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#333)); ```css
-webkit-background-clip: text; background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#333));
-webkit-text-fill-color: transparent; -webkit-background-clip: text;
-webkit-text-fill-color: transparent;
```
### Text stroke ### Text stroke
/* http://www.webkit.org/blog/85/introducing-text-stroke/ */ ```css
-webkit-text-stroke: 3px black; -webkit-text-stroke: 3px black;
```
See: [Introducing text stroke](http://www.webkit.org/blog/85/introducing-text-stroke/)
### iOS Scrolling prevention ### iOS Scrolling prevention
document.ontouchstart = (e) -> ```css
document.ontouchstart = (e) ->
$pane = $(e.target).closest('.scrollable>div') $pane = $(e.target).closest('.scrollable>div')
if $pane.length is 0 or $pane[0].scrollHeight <= $pane.innerHeight() if $pane.length is 0 or $pane[0].scrollHeight <= $pane.innerHeight()
e.preventDefault() e.preventDefault()
```
%ios-scrollable ```scss
&, >div %ios-scrollable {
-webkit-overflow-scrolling: touch &, >div {
overflow: auto -webkit-overflow-scrolling: touch;
overflow: auto;
}
>div >div {
position: absolute position: absolute;
top: 0 top: 0;
left: 0 left: 0;
right: 0 right: 0;
bottom: 0 bottom: 0;
}
}
```
Relevant in iOS6, but maybe not anymore.
### UIWebView optimizations ### UIWebView optimizations
/* http://www.bitsandpix.com/entry/ios-webkit-uiwebview-remove-tapclick-highlightborder-with-css/ */ ```css
/* * {
http://www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
*/
* {
-webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-user-select: none; /* disable text select */ -webkit-user-select: none; /* disable text select */
-webkit-touch-callout: none; /* disable callout, image save panel (popup) */ -webkit-touch-callout: none; /* disable callout, image save panel (popup) */
-webkit-tap-highlight-color: transparent; /* "turn off" link highlight */ -webkit-tap-highlight-color: transparent; /* "turn off" link highlight */
} }
a:focus { a:focus {
outline:0; // Firefox (remove border on link click) 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 Browser hacks
------------- -------------
{: .-three-column}
### Disclaimer
Not recommended, but here they are if you ever need them. Note that vendor Not recommended, but here they are if you ever need them. Note that vendor
prefixes may go away eventually. prefixes may go away eventually.
### Mozilla-only ### Mozilla-only
@-moz-document url-prefix() { ```css
@-moz-document url-prefix() {
.box { color: blue; } .box { color: blue; }
} }
```
### Webkit-only ### Webkit-only
@media all and (-webkit-min-device-pixel-ratio: 1) { ```css
} @media all and (-webkit-min-device-pixel-ratio: 1) {
}
```

View File

@ -1,8 +1,12 @@
--- ---
title: Dockerfile title: Dockerfile
category: Devops category: Devops
layout: 2017/sheet
--- ---
## Reference
{: .-three-column}
### Inheritance ### Inheritance
``` ```
@ -28,8 +32,9 @@ WORKDIR /myapp
### Onbuild ### Onbuild
```docker ```bash
ONBUILD RUN bundle install # when used with another file ONBUILD RUN bundle install
# when used with another file
``` ```
### Commands ### Commands
@ -39,6 +44,7 @@ EXPOSE 5900
CMD ["bundle", "exec", "rails", "server"] CMD ["bundle", "exec", "rails", "server"]
``` ```
### Reference ## See also
{: .-one-column}
- <https://docs.docker.com/engine/reference/builder/> - <https://docs.docker.com/engine/reference/builder/>

View File

@ -1,62 +1,84 @@
--- ---
title: Rsync title: Rsync
category: CLI category: CLI
layout: 2017/sheet
--- ---
rsync -avz ./src /dest ### Basic example
{: .-prime}
```bash
rsync -avz ./src /dest
```
### OSX ### OSX
--exclude '.Trashes' ```bash
--exclude '.Spotlight-V100' --exclude '.Trashes'
--exclude '.fseventsd' --exclude '.Spotlight-V100'
--exclude '.fseventsd'
```
### Options ### Transfer options
Transfer: ```bash
-z, --compress
-n, --dry-run
```
-z, --compress ### Display options
-n, --dry-run
Display: ```bash
-q, --quiet
-q, --quiet -v, --verbose
-v, --verbose -h, --human-readable
-h, --human-readable
--progress --progress
```
Skipping: ### Skipping options
-u, --update # skip files newer on dest ```bash
-c, --checksum # skip based on checksum, not mod-time & size -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 --suffix=SUFFIX # default ~ without --backup-dir
--backup-dir=DIR --backup-dir=DIR
```
### Include ### Include options
--exclude=PATTERN ```bash
--include=PATTERN --exclude=PATTERN
--include=PATTERN
```
--exclude-from=FILE ```bash
--include-from=FILE --exclude-from=FILE
--files-from=FILE # read list of filenames 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 ```bash
-l, --links # copy symlinks as links -r, --recursive
-p, --perms # preserve permissions -l, --links # copy symlinks as links
-t, --times # preserve times -p, --perms # preserve permissions
-g, --group # preserve group -t, --times # preserve times
-o, --owner # preserve owner -g, --group # preserve group
-D # --devices --specials -o, --owner # preserve owner
-D # --devices --specials
--delete # Delete extra files ```
```bash
--delete # Delete extra files
```