Skip to content

Instantly share code, notes, and snippets.

View fatihacet's full-sized avatar
🤙

Fatih Acet fatihacet

🤙
View GitHub Profile
@fatihacet
fatihacet / yslow.html
Created October 15, 2011 21:38
YSlow Rules
<!DOCTYPE>
<html>
<head>
<title>YSlow Notes</title>
<style type="text/css">
body { margin: 0; padding: 0; background: #F6F6F6; font-size: 13px; color: #333; font-family: Arial; }
h2 { margin: 0; padding-left: 15px; font-size: 18px; border-bottom: 1px dotted #5F5F5F; color: #872929; }
p { margin: 0; padding: 5px 15px 30px; }
</style>
</head>
@fatihacet
fatihacet / getdomcount.js
Created October 14, 2011 15:11 — forked from dashersw/getdomcount.js
get dom element counts by tag name with jquery
var tags = {};
$("*").each(function(item) {
if (!tags[this.tagName]) {
tags[this.tagName] = 0;
}
tags[this.tagName]++;
});
console.dir(tags);
@fatihacet
fatihacet / isValidURL.js
Created October 11, 2011 12:31
URL validator regex
function isUrl(s) {
var regexp = /((http|https):\/\/)?[A-Za-z0-9\.-]{3,}\.[A-Za-z]{2}/;
return s.indexOf(' ') < 0 && regexp.test(s);
}
isUrl('http://fatihacet.com.tr')
@fatihacet
fatihacet / simple-aop.js
Created April 14, 2011 12:42 — forked from anonymous/gist:666343
simple aop in javascript
var fio = {};
fio.deneme = function(xxx){
alert(xxx);
}
var oldfunction = fio.deneme;
fio.deneme = function(){