Skip to content

Instantly share code, notes, and snippets.

View gnclmorais's full-sized avatar
🐙
Growing a beard

Gonçalo Morais gnclmorais

🐙
Growing a beard
View GitHub Profile
javascript:( function() {
console.group( 'Performance Information for all entries of ' + window.location.href );
console.log( '\n-> Duration is displayed in ms\n ' )
var entries = window.performance.getEntries();
entries = entries.sort( function( a, b ) {
return b.duration - a.duration;
} );
javascript:( function() {
console.group( 'Performance Information for all entries of ' + window.location.href );
console.log( '\n-> Duration is displayed in ms\n ' )
var entries = window.performance.getEntries();
entries = entries.sort( function( a, b ) {
return b.duration - a.duration;
} );
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
//
// the regular expression composed & commented
// could be easily tweaked for RFC compliance,
// it was expressly modified to fit & satisfy
// these test for an URL shortener:
@gnclmorais
gnclmorais / statusCodes.js
Created July 20, 2012 20:26
HTTP Statuses Codes for JavaScript
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Inspired by Filipe Kiss' protip (http://coderwall.com/p/o2hpka), *
* I decided to port his PHP variable to JavaScript. *
* Do whatever you want with this. Enjoy. Full credit to Filipe. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
var status = {
100: 'HTTP/1.1 100 Continue',
101: 'HTTP/1.1 101 Switching Protocols',
@gnclmorais
gnclmorais / dabblet.css
Created July 16, 2012 18:51 — forked from dstorey/dabblet.css
Keyframe animations
/* Keyframe animations */
@keyframes bounce-right {
0% { width: 520px; }
40% { width: 790px; }
70% { width: 750px; }
85% { width: 765px; }
100% { width: 760px; }
}
@keyframes bounce-left {
@gnclmorais
gnclmorais / dabblet.html
Created July 16, 2012 08:51 — forked from dstorey/dabblet.css
Untitled
<h1>Split view feature box with CSS skew transform and transitions</h1>
<div class="box sunrise"><a href="#box2"></a></div>
<div class="slider">
<div class="box sunset"><a href="#box1"></a></div>
</div>
<footer>
<p>Handcrafted by <a href="http://www.twitter.com/dstorey">@dstorey</a> for
<a href="http://www.generatedcontent.org/123456/split-feature">GeneratedContent.org</a>. Sunset image, <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">Some rights reserved</a> by <a href="http://www.flickr.com/photos/42429527@N03/">najeebkhan2009</a>. Sunrise image, <a href="http://creativecommons.org/licenses/by-nd/2.0/">Some rights reserved</a> by <a href="http://www.flickr.com/photos/petehogan/">3dpete</a>.</p>
</footer>
@gnclmorais
gnclmorais / dabblet.css
Created May 7, 2012 16:29 — forked from jackie/dabblet.css
FizzBuzz with CSS
/**
* FizzBuzz with CSS
*/
body {
counter-reset: fizzbuzz;
}
div {
@gnclmorais
gnclmorais / dabblet.css
Created April 19, 2012 15:48 — forked from LeaVerou/dabblet.css
Vertical centering with Flexbox + margin fallback
/**
* Vertical centering with Flexbox + margin fallback
* Lea Verou & David Storey
*/
html, body { height: 100%; }
body {
width: 100%; /* needed for FF */
margin: 0;
@gnclmorais
gnclmorais / dabblet.css
Created April 5, 2012 10:47
CSS3 Orbital Avatar
/**
* CSS3 Orbital Avatar
*/
.demo {
position: absolute;
top: 150px;
right: 200px;
}