Skip to content

Instantly share code, notes, and snippets.

Khalid Lafi lafikl

Block or report user

Report or block lafikl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pubkey.txt
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmce4xU19+wSLl2FziEoOy0Odc+SWAohUzziSDN8QRYxRgG5hlMtNOKl12g5LrdsAz/uTXRBJHzwv5ocQD+aCYFpCaRJ3M2AYPQ89Mva+UVY2y+Q9N6B7zf7N/cGKQyj9zY68QtJFNFlru9kohcwWhdY9eh1eXtSE56oTZ/N6l4O8cvJ2BUoGnuEJ1ze4+CeICZ8z6dw5cWuJN3k7e1FziJOYBs6orb5AFAoaRZjvlguFtc3okRTPV+xitHNww3E+AVtobf8jKKkTzhdj5gcBukAmT0hRxI4Lz8eeh5Uwgr7/w89viAUs2GKhAc12TMghyJLSJNSG97zXE77z8Uf8b klafi@Khalids-MacBook-Pro.local
View clearfix.css
.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.clearfix:after {
clear: both;
}
@lafikl
lafikl / foreach.js
Created Oct 2, 2013
forEach support for document.querySelectorAll
View foreach.js
// adding forEach to elements result from querySelectorAll
NodeList.prototype.forEach = Array.prototype.forEach;
HTMLCollection.prototype.forEach = Array.prototype.forEach;
document.querySelectorAll('a').forEach( function (element, index, array){
element.style.color = "red";
})
@lafikl
lafikl / .jshintrc
Created Aug 25, 2013
rules for jshint command-line utility.
View .jshintrc
{
"curly": true,
"eqeqeq": true,
"forin": true,
"camelcase": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"quotmark": "single",
@lafikl
lafikl / asyncScripts.js
Last active Dec 16, 2015
Load Scripts asynchronously.
View asyncScripts.js
function LoadScriptsAsync (src) {
if(!src) throw new Error('LoadScriptsAsync : You have to add a script src!');
var script = document.createElement('script'),
head = document.getElementsByTagName('head')[0];
script.type = "text/javascript";
script.src = src;
script.async = true; // new property in HTML5 : http://davidwalsh.name/html5-async
View em.html
<em>ما ندمت على الصمت قط فإن الكلام اذا كان من فضة كان السكوت من ذهب.</em>
View text-centered.html
<p class="text-centered">ما ندمت على الصمت قط فإن الكلام اذا كان من فضة كان السكوت من ذهب.</p>
View stand-out.html
<p class="stand-out">ما ندمت على الصمت قط فإن الكلام اذا كان من فضة كان السكوت من ذهب.</p>
View inline-list.html
<ul class="inline">
<li>عنصر١</li>
<li>عنصر٢</li>
<li>عنصر٣</li>
</ul>
View blockquote.html
<blockquote>
<p>ما ندمت على الصمت قط فإن الكلام اذا كان من فضة كان السكوت من ذهب.</p>
<small>لقمان الحكيم <cite title="Source Title">وصايا لقمان الحكيم</cite></small>
</blockquote>
You can’t perform that action at this time.