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:
[gd-tq] | |
type = drive | |
client_id = | |
client_secret = | |
scope = drive | |
root_folder_id = | |
service_account_file = | |
token = redacted | |
[gd-tq-cache] |
/** | |
* This script is to be deployed as a Lambda@Edge function for AWS Cloudfront which | |
* adds necessary web security headers to static sites hosted with S3 + Cloudfront. | |
* This behaviour is not currently (2017-09-27) supported as a configuration option in S3 or Cloudfront. | |
* | |
* Lambda trigger event name: "CloudFront Viewer Response" | |
* Installation instructions: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-create-functions.html | |
* | |
* Extras not currently included: | |
* |
First open a terminal and enter sudo apt-get install xrdp. When that is installed enter sudo nano /etc/xrdp/startwm.sh in the terminal. Make sure the last line looks like this: | |
. /etc/X11/Xsession | |
Then go to your home folder, rightclick and select Show hidden. If there is no file named .xsession, create it. If there is a filed named like that, open it and make sure that it looks like this when your done: lxsession -e LXDE -s Lubuntu | |
Now type sudo service xrdp restart in the terminal to restart xrdp. Now it should work :) | |
answered Feb 1 '15 at 9:52 |
/* | |
* Flatten Object @gdibble: Inspired by https://gist.github.com/penguinboy/762197 | |
* input: { 'a':{ 'b':{ 'b2':2 }, 'c':{ 'c2':2, 'c3':3 } } } | |
* output: { 'a.b.b2':2, 'a.c.c2':2, 'a.c.c3':3 } | |
*/ | |
var flattenObject = function(ob) { | |
var toReturn = {}; | |
var flatObject; | |
for (var i in ob) { | |
if (!ob.hasOwnProperty(i)) { |
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:
lass KeenHttpOutput < Fluent::Output | |
Fluent::Plugin.register_output('out-keen-http', self) | |
def initialize | |
super | |
require 'rubygems' | |
require 'eventmachine' | |
require 'em-http-request' | |
require 'cgi' | |
require 'json' |
# A ~/.gitconfig file | |
[user] | |
name = YOUR NAME | |
email = YOUR EMAIL | |
[github] | |
user = YOUR USERNAME | |
token = YOUR TOKEN | |
[core] | |
quotepath = false | |
editor = nvim |
<?php | |
// Put your device token here (without spaces): | |
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
// Put your private key's passphrase here: | |
$passphrase = 'xxxxxxx'; | |
// Put your alert message here: | |
$message = 'A push notification has been sent!'; |
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |