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
| # Installation | |
| brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid | |
| # Easy Peasy | |
| ffmpeg -i video.mp4 video.webm |
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
| require 'net/http' | |
| def working_url?(url_str) | |
| url = URI.parse(url_str) | |
| Net::HTTP.start(url.host, url.port) do |http| | |
| http.head(url.request_uri).code == '200' | |
| end | |
| rescue | |
| false | |
| end |
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
| /* | |
| Implementing Semantic UI and Algolia search can be a pain in the but if you're not use to deal with Semantic UI API stuff. This feels a little bit hackish but so far it works well enough; bonus for not needing the Algolia javascript client. | |
| */ | |
| var algolia = { | |
| id: "Algolia app ID", | |
| key: "Public key", | |
| index: "Index name" | |
| }; |
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
| {% layout none %} | |
| {% capture results %} | |
| {% for item in search.results %} | |
| {% assign product = item %} | |
| { | |
| "title" : {{ product.title | json }}, | |
| "url" : {{ product.url | within: product.collections.last | json }}, | |
| "thumbnail": {{ product.featured_image.src | product_img_url: 'thumb' | json }} | |
| } | |
| {% unless forloop.last %},{% endunless %} |
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
| {% comment %} Width of results box {% endcomment %} | |
| {% assign results_box_width = '242px' %} | |
| {% comment %} Background color of results box {% endcomment %} | |
| {% assign results_box_background_color = '#ffffff' %} | |
| {% comment %} Border color of results box {% endcomment %} | |
| {% assign results_box_border_color = '#d4d4d4' %} | |
| <script> | |
| $(function() { | |
| // Current Ajax request. |
NewerOlder