#Jekyll Base64 Encoder A Liquid tag for base64 encoding
Note: this plugin requires Colorize:
gem install colorize
| <?php | |
| function roundNum($n) { return round(10 * $n)/10; } | |
| // Insert your keys/tokens | |
| $consumerKey = '<your-key>'; | |
| $consumerSecret = '<your-key>'; | |
| $oAuthToken = '<your-key>'; | |
| $oAuthSecret = '<your-key>'; |
| # A Liquid tag for random number generation | |
| # Usage: {% random min:max %} where min and max are integers and min < max | |
| module Jekyll | |
| class Random < Liquid::Tag | |
| def initialize(tag_name, range, tokens) | |
| super | |
| limits = range.split(":") | |
| @min = limits[0].to_i |
| /* JSHint validated - copy into a javascript console and look at the output */ | |
| (function(title) { | |
| "use strict"; | |
| var lyrics = title.toUpperCase() + "\n---\n"; | |
| var even, verse; | |
| var sayAnimal = function(i) { | |
| even = !even |
| # Build ffmpeg on MacOs | |
| # https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX | |
| > brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265 | |
| # Conversion to WEBM format: | |
| # http://trac.ffmpeg.org/wiki/Encode/VP8 | |
| > ffmpeg -i input-file.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis output-file.webm | |
| section { | |
| width: 35%; | |
| } | |
| section div { | |
| /* Aspect ratio: 16:9 */ | |
| height: 0; | |
| width: 100%; | |
| position: relative; | |
| padding-bottom: 56.25%; | |
| } |
| <div>1</div> | |
| <div>2</div> | |
| <div>3</div> | |
| <div>4</div> | |
| <div>5</div> |
#Jekyll Base64 Encoder A Liquid tag for base64 encoding
Note: this plugin requires Colorize:
gem install colorize
| #!/bin/sh | |
| # set last 2 digits of the current year | |
| year=16 | |
| # set terminal title | |
| echo "\033]0;FTF Early Bird Checker\007"; | |
| # Complete statement of the problem | |
| # https://code.google.com/codejam/contest/3264486/dashboard#s=p1 | |
| # Tatiana likes to keep things tidy. Her toys are sorted from smallest | |
| # to largest, her pencils are sorted from shortest to longest and her computers | |
| # from oldest to newest. One day, when practicing her counting skills, she | |
| # noticed that some integers, when written in base 10 with no leading zeroes, | |
| # have their digits sorted in non-decreasing order. Some examples of this are 8, | |
| # 123, 555, and 224488. She decided to call these numbers tidy. Numbers that do | |
| # not have this property, like 20, 321, 495 and 999990, are not tidy. |
| /* Usage: | |
| * when Google image returns some results, before choosing an image just inject | |
| * this code into the JS console and a new button with a direct link to the image | |
| * will appear inside the overlay. | |
| */ | |
| var config = { | |
| attributes: true, | |
| childList: false, | |
| characterData: false, |