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:
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:
| /** | |
| * Get a random floating point number between `min` and `max`. | |
| * | |
| * @param {number} min - min number | |
| * @param {number} max - max number | |
| * @return {number} a random floating point number | |
| */ | |
| function getRandomFloat(min, max) { | |
| return Math.random() * (max - min) + min; | |
| } |
| var tweet = "Currently chilling out at W1B 2EL, then on to WC2E 8HA or maybe even L1 8JF! :-)"; | |
| // Here's a simple regex that tries to recognise postcode-like strings. | |
| // See http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom#Validation | |
| // for the rules on how UK postcodes are formatted. | |
| var postcode_regex = /[A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}/g; | |
| var postcodes = tweet.match(postcode_regex); | |
| console.log(postcodes); |
| @mixin placeholder-color($color) { | |
| &::-webkit-input-placeholder { /* WebKit browsers */ | |
| color: $color; | |
| } | |
| &:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ | |
| color: $color; | |
| } | |
| &::-moz-placeholder { /* Mozilla Firefox 19+ */ | |
| color: $color; | |
| } |
| <html> | |
| <head> | |
| <title>CSS3 Slide to unlock</title> | |
| <style type="text/css"> | |
| body { | |
| background:#333; | |
| } | |
| .slider-text { |
| <?php | |
| /** | |
| * Custom Loop Add to Cart. | |
| * | |
| * Template with quantity and ajax. | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. | |
| global $product; |
| Handlebars.registerHelper ('truncate', function (str, len) { | |
| if (str.length > len) { | |
| var new_str = str.substr (0, len+1); | |
| while (new_str.length) { | |
| var ch = new_str.substr ( -1 ); | |
| new_str = new_str.substr ( 0, -1 ); | |
| if (ch == ' ') { | |
| break; |
| <?php | |
| // Resizer and Image Manipulation | |
| // Based on: http://forums.laravel.com/viewtopic.php?id=2648 | |
| public function post_edit_logo($id) | |
| { | |
| $rules = array( | |
| 'image' => 'image', | |
| ); |
This repo's location has changed.
| MIT License | |
| Copyright (c) 2022 Justin | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |