This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var __slice = Array.prototype.slice; | |
| function getWith(attr) { | |
| return function (object) { return object[attr]; }; | |
| } | |
| function mapWith(fn) { | |
| return function (list) { | |
| return Array.prototype.map.call(list, fn); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| map $uri $blogname{ | |
| ~^(?P<blogpath>/[^/]+/)files/(.*) $blogpath ; | |
| } | |
| map $blogname $blogid{ | |
| default -999; | |
| #Ref: http://wordpress.org/extend/plugins/nginx-helper/ | |
| #include /var/www/wordpress/wp-content/plugins/nginx-helper/map.conf ; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "Database Name: " | |
| read -e dbname | |
| echo "Database User: " | |
| read -e dbuser | |
| echo "Database Password: " | |
| read -s dbpass | |
| echo "run install? (y/n)" | |
| read -e run | |
| if [ "$run" == n ] ; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget -r -P . -A jpeg,jpg,png,gif,bpm --reject="index.html" -e robots=off http://domain.com/path/to//wp-content/uploads |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <picture> | |
| <source media="(min-width: 600px)" srcset-"large.jpg, large-@2x.jpg 2x"> | |
| <img src="small.jpg" alt="alternative text"> | |
| </picture> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <span data-picture> | |
| <span data-src="small.jpg"></span> | |
| <span data-src="small-@x2.jpg" data-media="(min-device-pixel-ratio: 2.0)"></span> | |
| <span data-src="medium.jpg" data-media="(min-width: 1030px)"></span> | |
| <span data-src="medium-@2x.jpg" data-media="(min-width: 1030px) and (min-device-pixel-ratio: 2.0)"></span> | |
| <span data-src="large.jpg" data-media="(min-width: 1240px)"></span> | |
| <span data-src="large-@2x.jpg" data-media="(min-width: 1240px) and (min-device-pixel-ratio: 2.0)"></span> | |
| <noscript> | |
| <img src="medium.jpg"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $images = get_children(array( | |
| 'post_parent' => get_the_ID(), | |
| 'post_type' => 'attachment', | |
| 'post_mime_type' => 'image', | |
| ); | |
| if ( $images ) : ?> | |
| <?php foreach( $images as $image ) : ?> | |
| <span data-picture> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function truncated_title($limit = 49){ | |
| $title = substr(get_the_title(), 0, $limit); | |
| if (strlen($title) > $limit) { | |
| $title .= " ..."; | |
| } | |
| return $title; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @font-face { | |
| font-family: 'francois_oneregular'; | |
| src: url('francoisone.eot'); | |
| src: url('francoisone.eot?#iefix') format('embedded-opentype'), | |
| url('francoisone.woff') format('woff'), | |
| url('francoisone.ttf') format('truetype'), | |
| url('francoisone.svg#francois_oneregular') format('svg'); | |
| font-weight: normal; | |
| font-style: normal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| img:hover{ | |
| filter: grayscale(100%); | |
| -webkit-filter: grayscale(100%); | |
| -moz-filter: grayscale(100%); | |
| -ms-filter: grayscale(100%); | |
| -o-filter: grayscale(100%); | |
| } |