Skip to content

Instantly share code, notes, and snippets.

@phamann
phamann / Network-Timing-API.js
Last active August 9, 2020 03:00
Example of gathering request timing information using the Navigation timing API
function getPerformanceData() {
var perf = window.performance || window.msPerformance || window.webkitPerformance || window.mozPerformance;
if (perf) {
var t = perf.timing;
return [
// Time required for domain lookup.
t.domainLookupEnd - t.domainLookupStart,
// Time to establish a connection to server.
t.connectEnd - t.connectStart,
UTIL = {
exec: function( controller, action ) {
var ns = SITENAME,
action = ( action === undefined ) ? "init" : action;
if ( controller !== "" && ns[controller] && typeof ns[controller][action] == "function" ) {
ns[controller][action]();
}
},
@phamann
phamann / button.css
Created August 22, 2012 08:19
Themeing Sencha Touch with SASS blog post
.x-button.x-button-astonvilla {
background-image: none;
background-color: #650032;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #B20058), color-stop(50%, #7F003F), color-stop(51%, #650032), color-stop(100%, #4C0025));
background-image: -webkit-linear-gradient(top, #B20058, #7F003F 50%, #650032 51%, #4C0025);
background-image: linear-gradient(top, #B20058, #7F003F 50%, #650032 51%, #4C0025);
}
@phamann
phamann / Preferences.sublime-settings
Created May 18, 2012 14:12
SublimeText2 - User preferences
{
//Turn on tab completing over hitting enter
"auto_complete_commit_on_tab": true,
//Auto indenting on new line within block
"auto_indent": true,
//Mine is Solarized Dark
"color_scheme": "Your theme of choice",
{
"auto_complete_commit_on_tab": true,
"auto_indent": true,
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"dictionary": "Packages/Language - English/en_GB.dic",
"draw_minimap_border": false,
"draw_white_space": "all",
"fallback_encoding": "UTF-8",
"folder_exclude_patterns":
[
@phamann
phamann / Sublime2_prefrences.json
Created February 14, 2012 10:46
Sublime2 user prefrences
{
"auto_complete_commit_on_tab": true,
"auto_indent": true,
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"dictionary": "Packages/Language - English/en_GB.dic",
"draw_minimap_border": false,
"draw_white_space": "all",
"fallback_encoding": "UTF-8",
"font_size": 14.0,
"highlight_line": true,
@phamann
phamann / breadcrumb.html
Created March 30, 2011 08:31 — forked from anonymous/breadcrumb.html
Accessible breadcrumbs snippet
<nav>
<p id="breadcrumblabel" class="audible">You are here:</p>
<ol id="breadcrumb" role="navigation" aria-labelledby="breadcrumblabel">
<li><a href="" title="Dashboard">Admin</a> &gt;</li>
<li>Suppliers</li>
</ol>
</nav>