Skip to content

Instantly share code, notes, and snippets.

Cecile Muller cecilemuller

Block or report user

Report or block cecilemuller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
cecilemuller / get_combinations.php
Created Feb 1, 2013
PHP: Get all combinations of multiple arrays (preserves keys)
View get_combinations.php
function get_combinations($arrays) {
$result = array(array());
foreach ($arrays as $property => $property_values) {
$tmp = array();
foreach ($result as $result_item) {
foreach ($property_values as $property_value) {
$tmp[] = array_merge($result_item, array($property => $property_value));
cecilemuller /
Last active Feb 22, 2020
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)

Virtual hosts

Let's say you want to host domains and

Create folders for their files:

soarez /
Last active Feb 21, 2020
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

cecilemuller /
Last active Feb 20, 2020
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

n1k0 / 404checker.js
Created Jan 11, 2013
A CasperJS script to check for 404 & 500 internal links on a given website
View 404checker.js
* This casper scipt checks for 404 internal links for a given root url.
* Usage:
* $ casperjs 404checker.js http://mysite.tld/
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42
/*global URI*/
toji / motion-controllers-example.js
Created Jan 23, 2020
Using motion-controllers.modules.js
View motion-controllers-example.js
// A barebones example of how to use the motion-controllers library and assets repository to load controller models in yor WebXR app
// This gist will not go into the details of how to set up a WebXR app (See for that)
// but will instead focus on the parts needed to find and load the appropriate controller.
// The motion-controllers library is small enough that it can easily be dropped into your own codebase if you wish, but loading it
// directly from a CDN like jsdelivr is an even easier route to getting up and running.
import { fetchProfile } from '';
// The assets package ( is larger, about 67Mb at time of writing,
// so it may be more beneficial to always use a CDN for it, especially since that will enable your app to pick up new controllers
cecilemuller / index.html
Last active Jan 8, 2020
Record three.js to WebM video using CCapture.js
View index.html
<html lang="en">
<title>Record WebGL to WebM (Chrome only)</title>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css" charset="utf-8">
<div class="buttons">
scottjehl /
Last active Dec 25, 2019
Comparing two ways to load non-critical CSS

I wanted to figure out the fastest way to load non-critical CSS so that the impact on initial page drawing is minimal.

TL;DR: Here's the solution I ended up with:

For async JavaScript file requests, we have the async attribute to make this easy, but CSS file requests have no similar standard mechanism (at least, none that will still apply the CSS after loading - here are some async CSS loading conditions that do apply when CSS is inapplicable to media: ).

Seems there are a couple ways to load and apply a CSS file in a non-blocking manner:

cecilemuller / example.html
Last active Nov 25, 2019
Better underlines, especially on Retina
View example.html
Lorem ipsum consectetur <a href="#">simple basic link paqejigu</a> adipisicing
elit aut <a class="enhanced" href="#">simple enhanced link paqejigu</a> aut officia
adipisci nemo perferendis eveniet delectus ipsam consectetur. Molestiae, iste
ipsa sit aliquid quasi quidem ab? Enim veritatis architecto commodi!
Lorem ipsum consectetur <b><a href="#">bold basic link paqejigu</a></b> adipisicing
elit aut <b><a class="enhanced" href="#">bold enhanced link paqejigu</a></b> officia
dustinmm80 /
Created Sep 15, 2013
An example of how to write Vagrantfiles following the DRY principle.
Example box JSON schema
    :name => :name_of_vagrant_box, #REQUIRED
    :ip => '', #REQUIRED
    :synced_folders => [
        { '.' => '/home/vagrant/myapp' }
    :commands => [
You can’t perform that action at this time.