Skip to content

Instantly share code, notes, and snippets.

Avatar

Cecile Muller cecilemuller

View GitHub Profile
@cecilemuller
cecilemuller / index.html
Created Nov 11, 2011
Getting started with BS Contact iOS
View index.html
<!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 Nov 18, 2011
iPhone, iPad and Android icons and loading screens for web applications
View gist:1375646
<!-- 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 / combine_rotations.wrl
Created Jan 8, 2012
Combine two SFRotation into a single SFRotation using VRMLScript
View combine_rotations.wrl
#VRML V2.0 utf8
Viewpoint{
position 0 0 10
}
#
@cecilemuller
cecilemuller / blurry.html
Created Jan 10, 2012
Blurry text on mouseover using CSS3
View blurry.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
body {
background: #333333;
}
@cecilemuller
cecilemuller / code.css
Created Jan 13, 2012
Display textfield labels in the style of fieldset legends
View code.css
.fieldset {
position: relative;
font-size: sans-serif;
display: block;
width: 100%;
padding: 0;
margin: 20px 0;
height: 64px;
}
@cecilemuller
cecilemuller / get_tweets.php
Created Jan 23, 2012
Get a user's most recent tweets in PHP (including retweets, formatted mentions/hashtags and friendly dates)
View get_tweets.php
<?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 Jan 25, 2012
Add `CTRL + Click` to display the name and tree of object(s) you clicked using `Browser.mouseSelect`
View scene.wrl
#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 Mar 4, 2012
Static template via a SCRIPT tag, using Jquery Templates
View gist:1972787
<!--
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>
@cecilemuller
cecilemuller / script.js
Created Mar 4, 2012
Dynamic template from an arbitrary string, using Jquery Templates
View script.js
/**
* Dynamic template from an arbitrary string
* (which could be stored in an external file or even in a database).
*
* Works even without the "plus" extension of the Templates plugin.
* http://github.com/nje/jquery-tmpl
*/
var MyData = {hello: "world"};
$.template("MyInlineTemplate", "<div>Hello ${hello}</div>");
$.tmpl("MyInlineTemplate", MyData).appendTo("#contents");
@cecilemuller
cecilemuller / FragmentShader.wrl
Created Mar 4, 2012
Three ways to embed an HLSL shader in VRML/X3D
View FragmentShader.wrl
#VRML V2.0 utf8
Transform {
translation -4 2 0
children Shape {
appearance Appearance{
material Material{
diffuseColor 0 0 0
emissiveColor 1 1 1
}
You can’t perform that action at this time.