A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
| FILE SPACING: | |
| # double space a file | |
| sed G | |
| # double space a file which already has blank lines in it. Output file | |
| # should contain no more than one blank line between lines of text. | |
| sed '/^$/d;G' |
| // Getting a file through XMLHttpRequest as an arraybuffer and creating a Blob | |
| var rhinoStorage = localStorage.getItem("rhino"), | |
| rhino = document.getElementById("rhino"); | |
| if (rhinoStorage) { | |
| // Reuse existing Data URL from localStorage | |
| rhino.setAttribute("src", rhinoStorage); | |
| } | |
| else { | |
| // Create XHR, Blob and FileReader objects | |
| var xhr = new XMLHttpRequest(), |
| function go() { | |
| var userId = prompt('Username?', 'Guest'); | |
| checkIfUserExists(userId); | |
| } | |
| var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users'; | |
| function userExistsCallback(userId, exists) { | |
| if (exists) { | |
| alert('user ' + userId + ' exists!'); |
| (function() { | |
| 'use strict'; | |
| var map, //the google map | |
| directionsService, //service that provides directions to reach our destination | |
| directionsDisplay, //renderer that draws directions on map | |
| destinationName = 'Ventorro del Cano, Madrid'; //our destination. Set yours! | |
| // providers | |
| var html5Provider = function() { | |
| return { |
| // USAGE ------ | |
| // ============ | |
| var shell = require('./shellHelper'); | |
| // execute a single shell command | |
| shell.exec('npm test --coverage', function(err){ | |
| console.log('executed test'); | |
| }}); |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
This is a reference to Matthew Ericson's article Export Illustrator Layers and/or Artboards as PNGs and PDFs in case something happens to happen to the article, and if I just forget where to find the exporter online.
MultiExporter.js into /Applications/Adobe\ Illustrator\ CS6/Presets.localized/en_GB/Scripts| <?php if( have_rows('faqs') ): ?> | |
| <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> | |
| <?php $i=1; while ( have_rows('faqs') ) : the_row(); ?> | |
| <div class="panel panel-default"> | |
| <div class="panel-heading" role="tab" id="heading-<?php echo $i; ?>"> | |
| <h2 class="panel-title"> | |
| <a data-toggle="collapse" data-parent="#accordion" href="#collapse-<?php echo $i; ?>" aria-expanded="true" aria-controls="collapseOne"> | |
| <?php the_sub_field('question'); ?> | |
| </a> | |
| </h2> |
| <?php if( have_rows('tabs') ): ?> | |
| <ul class="nav nav-tabs" id="myTab" role="tablist"> | |
| <?php $i=0; while ( have_rows('tabs') ) : the_row(); ?> | |
| <?php | |
| $string = sanitize_title( get_sub_field('tab_title') ); | |
| ?> | |
| <li role="presentation" <?php if ($i==0) { ?>class="active"<?php } ?> > | |
| <a href="#<?php echo $string ?>" aria-controls="<?php echo $string ?>" role="tab" data-toggle="tab"><?php the_sub_field('tab_title'); ?></a> | |
| </li> | |
| <?php $i++; endwhile; ?> |
| /* Change all src urls loaded from external urls | |
| * to dataUrls stored on the local storage. | |
| */ | |
| var changeAllSrcToDataUrl = function() { | |
| // Get all images on page or element to render | |
| $("img").each(function() { | |
| var image = this; | |
| // If it last image, proceed to canvas rendering | |
| var isLast = this === $("img")[$("img").length - 1] || false; |