Skip to content

Instantly share code, notes, and snippets.

View cecilemuller's full-sized avatar

Cecile Muller cecilemuller

View GitHub Profile
@cecilemuller
cecilemuller / combine_rotation.wrl
Created May 18, 2013 05:52
Combine two SFRotation
#VRML V2.0 utf8
# (because I always forget the link to my post: http://comp.lang.vrml.narkive.com/RS6A2W0P/add-two-sfrotation-in-js)
Viewpoint{description "A"}
DEF tr1 Transform{
rotation 0.5 0.4 0.1 2
children Transform{
rotation 0.1 0.6 0.3 -0.8
children DEF obj Shape{
@cecilemuller
cecilemuller / classes.bootstrap.js
Last active May 12, 2019 15:29
Dynamically-generated (and optionally multi-steps) modals for Bootstrap 2.3.2
(function() {
"use strict";
/**
* @namespace
*/
var BOOTSTRAP = {};
/**
@dustinmm80
dustinmm80 / multivm_vagrant_dry.md
Created September 15, 2013 04:48
An example of how to write Vagrantfiles following the DRY principle.
=begin
Example box JSON schema
{
    :name => :name_of_vagrant_box, #REQUIRED
    :ip => '10.0.0.11', #REQUIRED
    :synced_folders => [
        { '.' => '/home/vagrant/myapp' }
    ],
    :commands => [
run:
casperjs index.js && convert *.jpg video.mpeg && gify video.mpeg out.gif && rm *.jpg video.mpeg
@soarez
soarez / ca.md
Last active April 19, 2025 14:41
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
cecilemuller / Emmet.sublime-settings
Last active November 21, 2020 10:59
HTML & Stylus boilerplate snippets for Emmet (ST3)
{
"autodetect_xhtml": false,
"snippets": {
"html": {
"snippets": {
"meta:viewport": "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no\">",
"meta:ua": "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">",
"js:html5":"<!--[if lt IE 9]>\n<script src=\"\/\/html5shiv.googlecode.com/svn/trunk/html5.js\"></script>\n<![endif]-->",
"js:empty": "<script>\n(function(){\n\t'use strict';\n\t\/\/\n\t\/\/ TODO\n\t\/\/\n})();\n</script>",
"js:webfont2": "<script>\nWebFont.load({\n\tgoogle: {\n\t\tfamilies: ['Droid Sans:n4:i4:n7', 'Droid Serif']\n\t}\n});\n</script>",
@cecilemuller
cecilemuller / example.html
Last active November 25, 2019 19:04
Better underlines, especially on Retina
<p>
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!
</p>
<p>
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
@scottjehl
scottjehl / noncritcss.md
Last active August 12, 2023 16:57
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: https://github.com/filamentgroup/loadCSS/


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: https://gist.github.com/igrigorik/2935269#file-notes-md ).

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

@cecilemuller
cecilemuller / proto.OrientationToDirection.wrl
Last active August 29, 2015 14:08
Convert an SFRotation orientation to an SFVec3f direction
#VRML V2.0 utf8
#
# Convert an SFRotation orientation to an SFVec3f direction
#
PROTO OrientationToDirection [
eventIn SFRotation set_orientation
eventOut SFVec3f direction_changed
]{
Script {

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).