Skip to content

Instantly share code, notes, and snippets.

View cecilemuller's full-sized avatar

Cecile Muller cecilemuller

View GitHub Profile
@cecilemuller
cecilemuller / index.html
Created November 11, 2011 12:03
Getting started with BS Contact iOS
<!DOCTYPE>
<html>
<head>
<title>3D Demos</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link rel="apple-touch-icon" href="icon.png" />
<link href="styles.css" rel="stylesheet" />
@cecilemuller
cecilemuller / gist:1375646
Created November 18, 2011 05:00
iPhone, iPad and Android icons and loading screens for web applications
<!-- For iPhone 4 with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114x114-precomposed.png">
<!-- For first-generation iPad: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png">
@cecilemuller
cecilemuller / text_to_speech.wrl
Created January 5, 2012 15:58
TextToSpeech{} usage example in VRML/X3D
#VRML V2.0 utf8
EXTERNPROTO TextToSpeech [
exposedField SFString description
exposedField SFFloat pitch
exposedField SFFloat volume
exposedField SFFloat speed
exposedField SFBool enabled
eventIn SFString text
eventOut SFBool isActive
@cecilemuller
cecilemuller / Google-TextToSpeech.wrl
Created January 6, 2012 15:51
Better text-to-speech using Google Translate in VRML/X3D
#VRML V2.0 utf8
Sound {
location 0 0 10
spatialize FALSE
source DEF mp3 AudioClip {
loop FALSE
## Français
@cecilemuller
cecilemuller / combine_rotations.wrl
Created January 8, 2012 11:49
Combine two SFRotation into a single SFRotation using VRMLScript
#VRML V2.0 utf8
Viewpoint{
position 0 0 10
}
#
@cecilemuller
cecilemuller / blurry.html
Created January 10, 2012 23:17
Blurry text on mouseover using CSS3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
body {
background: #333333;
}
@cecilemuller
cecilemuller / code.css
Created January 13, 2012 02:19
Display textfield labels in the style of fieldset legends
.fieldset {
position: relative;
font-size: sans-serif;
display: block;
width: 100%;
padding: 0;
margin: 20px 0;
height: 64px;
}
@cecilemuller
cecilemuller / get_tweets.php
Created January 23, 2012 10:05
Get a user's most recent tweets in PHP (including retweets, formatted mentions/hashtags and friendly dates)
<?php
/**
* Calculate the time elapsed from the timestamp described in the string
* and converts into a human-readable version (e.g. "about 3 days ago").
*/
function how_long_ago($date) {
$ago = false;
$elapsed = time() - strtotime($date);
if ($elapsed <= 1) {
@cecilemuller
cecilemuller / scene.wrl
Created January 25, 2012 16:56
Add `CTRL + Click` to display the name and tree of object(s) you clicked using `Browser.mouseSelect`
#VRML V2.0 utf8
Inline{url "some_file.wrl"}
DEF mouse MouseSensor {}
DEF script Script {
eventIn SFVec2f position
eventIn SFBool click
directOutput TRUE
url "javascript:
@cecilemuller
cecilemuller / gist:1972787
Created March 4, 2012 12:28
Static template via a SCRIPT tag, using Jquery Templates
<!--
Works even without the "plus" extension of the Templates plugin.
http://github.com/nje/jquery-tmpl
-->
<script id="MyStaticTemplate" type="text/x-jquery-tmpl">
<div>Hello ${hello}</div>
</script>
<script>