Skip to content

Instantly share code, notes, and snippets.

@jamesflorentino
jamesflorentino / favicons.html
Created September 23, 2012 11:37
favicon html template
<link rel="icon" href="/favicon_16x16.png" sizes="16x16" type="image/png">
<link rel="icon" href="/favicon_32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="/favicon_64x64.png" sizes="64x64" type="image/png">
<link rel="icon" href="/favicon_128x128.png" sizes="128x128" type="image/png">
<!-- home screen for iphones without the gloss effect -->
<link rel="apple-touch-icon-precomposed" href="/images/icon-iphone.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/images/icon-ipad.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/images/icon-iphone4.png">
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
@jamesflorentino
jamesflorentino / index.html
Created September 18, 2012 18:48
HTML5 form validator example
<!doctype>
<html>
<head>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<form>
<h4>User name</h4>
<input
type = "text"
<link rel="stylesheet" href="style.css" />
<section>
<h1 class="logo"></h1>
<ul>
<li><a class="profile icon"></a></li>
<li><a class="contact icon"></a></li>
<li><a class="close icon"></a></li>
</ul>
<p>I saw for the first time the earth's shape. I could easily see the shores of continents, islands, great rivers, folds of the terrain, large bodies of water. The horizon is dark blue, smoothly turning to black. . . the feelings which filled me I can express with one word - joy.</p>
<link href="style.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="script.js"></script>
<table class="format2" >
<thead>
<tr>
<td>Toggle visibility</td>
</tr>
</thead>
<link href="style.css" rel="stylesheet" />
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="script.js"></script>
<div class="ipro_menu">
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Contact</a></li>
@jamesflorentino
jamesflorentino / ignore-me-script.js
Created July 9, 2012 03:37
high-res logo using custom-created font
window.addEventListener('load', function(){
var hey = document.querySelector('.button'),
you = document.querySelector('.icon');
window.you = you;
if (!hey) return;
you.scale = 1;
hey.addEventListener('click', function () {
var scale = you.scale = you.scale === 1 ? 2 : 1;
var rotate = (scale === 1 ? 360 : 0) + 'deg';
you.setAttribute('style','-webkit-transform: scale(' + scale + ')');
@jamesflorentino
jamesflorentino / index.html
Created July 9, 2012 01:06
Setting up nanoScroller as the entire gadget UI.
<link href="https://raw.github.com/jamesflorentino/nanoScrollerJS/master/bin/css/nanoscroller.css" rel="stylesheet"/>
<script src="https://raw.github.com/jamesflorentino/nanoScrollerJS/master/bin/javascripts/jquery.nanoscroller.min.js"></script>
<script>
<style>
body, html { height: 100%; font-size: 1em; font-family: Helvetica Neue, Helvetica, sans-serif ;}
#main { position: absolute; top: 0; right: 0; bottom: 0; left; 0; }
</style>
<script>
@jamesflorentino
jamesflorentino / index.html
Created July 7, 2012 23:39
Hiding Texts in CSS
<style>
.logo {
background: url(https://a248.e.akamai.net/assets.github.com/images/modules/header/logo_gist.png?1315867479) top left no-repeat;
width: 655px;
height: 0;
overflow: hidden;
padding-top: 177px;
}
</style>
<style>
@import "style.css";
</style>
<div>
<h1>Watch this carefully between hover states.</h1>
</div>