This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
// Build the https based part & read the key and crt file that is required to encrypte the server / client connection | |
var ssl = https.createServer({ | |
key: fs.readFileSync( "./ssl/ssl.private.key" ).toString() | |
, cert: fs.readFileSync( "./ssl/ssl.crt" ).toString() | |
}); | |
// This is the part what it's all about, we are going to route all | |
// https based requires to the default app handler | |
ssl.addListener( "request", function sllRequestListener( req, res ){ | |
req.ssl = true; // just add an extra flag so we can see if it was forwarded from https |
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
/* | |
* Copyright (C) 2013 Square, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
@function prefix($property, $prefixes: (webkit moz o ms)) { | |
$vendor-prefixed-properties: transform background-clip background-size; | |
$result: (); | |
@each $prefix in $prefixes { | |
@if index($vendor-prefixed-properties, $property) { | |
$property: -#{$prefix}-#{$property} | |
} | |
$result: append($result, $property); | |
} | |
@return $result; |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
# sets the proxy cache path location, max size 2g | |
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g; | |
# transfers the `Host` header to the backend | |
proxy_set_header Host $host; | |
# uses the defined STATIC cache zone | |
proxy_cache STATIC; | |
# cache 200 10 minutes, 404 1 minute, others status codes not cached |
#!/usr/bin/env bash | |
set -u | |
set -e | |
export GIT_WORK_TREE="/var/www/example.com" | |
export NODE_VERSION="0.10" | |
echo "--> Checking out..." | |
git checkout -f |
package com.cyrilmottier.android.resourcesadditions; | |
import android.content.res.Resources; | |
import android.content.res.XmlResourceParser; | |
import android.os.Bundle; | |
import org.xmlpull.v1.XmlPullParser; | |
import org.xmlpull.v1.XmlPullParserException; | |
/** | |
* @author Cyril Mottier |