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
@lafikl
lafikl / .vimrc
Created Jan 15, 2015
my personal .vimrc
View .vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
View wpt-proxy.md

Wish list:

  • Round-robin load balancing
  • Failure detection
  • Results caching [LRU or/and Browser cache]
  • Webhooks, Notify subscribers when a certain event happens.
  • Plugins system, which will allow developers to add custom logic for their apps. Like sending results over statsd.
  • Websockets support for test progress
  • Dashboard to see what's happening in the cluster right now.
View meta.html
<meta http-equiv="X-UA-Compatible" content="IE=edge">
View steady.js
var el = document.getElementById('head'); // caching it for better performance
var steady = new Steady({
throttle: 100,
handler: function(el, done) {
console.log('woo!');
// this important to tell Steady that you finished processing so it can call you later
done();
}
});
View app.js
// jQuery.event.swipe
// 0.5
// Stephen Band
// Dependencies
// jQuery.event.move 1.2
// One of swipeleft, swiperight, swipeup or swipedown is triggered on
// moveend, when the move has covered a threshold ratio of the dimension
// of the target node, or has gone really fast. Threshold and velocity
View instance.js
var s = new Steady({
conditions: {
"width": 400,
"min-top": 50,
"max-bottom": 200
},
throttle: 100,
handler: fn
});
View scrollable.html
<!DOCTYPE html>
<html>
<head>
<title>Hello world!</title>
</head>
<body>
<!-- some HTML things here -->
<div class="scrollable"></div>
View app.js
$(document).ready( function() {
var acl = $('.active').offset();
var aw = $('.active').width();
var ll = acl.left + parseInt( aw / 2 );
var tt = acl.top + 39;
$('#active').css({
left : ll + 'px',
top : tt + 'px'
});
$('.link.ac a').on('click', function() {
View a.js
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
if ( getParameterByName('field_ticket_number_value') ) {
$(".get-status").trigger('click');
You can’t perform that action at this time.