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:
# Add to your .env.example and .env files | |
CSP_ENABLED=true | |
CSP_REPORT_ONLY=true |
const https = require('https'); | |
const fs = require('fs'); | |
// https://github.com/majodev/google-webfonts-helper/blob/master/server/logic/conf.js | |
const FORMAT_USER_AGENTS = { | |
// see http://www.dvdprojekt.de/category.php?name=Safari for a list of sample user handlers | |
// test generation through running grunt mochaTest:src | |
eot: 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)', | |
woff: 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0', | |
// must serve complete woff2 file for one variant (no unicode range support yet!) |
Promise.prototype.finally = function (callback) { | |
return this.then( | |
value => this.constructor.resolve(callback()).then(() => value), | |
reason => this.constructor.resolve(callback()).then(() => { throw reason }) | |
) | |
} |
{ | |
"query": { | |
"function_score": { | |
"query": { | |
"bool": { | |
"must": { | |
"multi_match": {"query": "Renaissance", "fields": ["name", "company"]}, | |
"term": {"features": "disability_access"}, | |
}, | |
"should": { |
#!/bin/bash | |
# How to install PHP memcached on CentOS 6.5 | |
# Install dependencies | |
yum install cyrus-sasl-devel zlib-devel gcc-c++ | |
# Get the latest libmemcached | |
wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz | |
tar -xvf libmemcached-1.0.16.tar.gz |
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:
/* | |
|-------------------------------------------------------------------------- | |
| Delete form macro | |
|-------------------------------------------------------------------------- | |
| | |
| This macro creates a form with only a submit button. | |
| We'll use it to generate forms that will post to a certain url with the DELETE method, | |
| following REST principles. | |
| | |
*/ |
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |