Skip to content

Instantly share code, notes, and snippets.

View lafikl's full-sized avatar

Khalid Lafi lafikl

View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmce4xU19+wSLl2FziEoOy0Odc+SWAohUzziSDN8QRYxRgG5hlMtNOKl12g5LrdsAz/uTXRBJHzwv5ocQD+aCYFpCaRJ3M2AYPQ89Mva+UVY2y+Q9N6B7zf7N/cGKQyj9zY68QtJFNFlru9kohcwWhdY9eh1eXtSE56oTZ/N6l4O8cvJ2BUoGnuEJ1ze4+CeICZ8z6dw5cWuJN3k7e1FziJOYBs6orb5AFAoaRZjvlguFtc3okRTPV+xitHNww3E+AVtobf8jKKkTzhdj5gcBukAmT0hRxI4Lz8eeh5Uwgr7/w89viAUs2GKhAc12TMghyJLSJNSG97zXE77z8Uf8b klafi@Khalids-MacBook-Pro.local
@lafikl
lafikl / .vimrc
Created January 15, 2015 12:31
my personal .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'

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.
<meta http-equiv="X-UA-Compatible" content="IE=edge">
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();
}
});
// 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
var s = new Steady({
conditions: {
"width": 400,
"min-top": 50,
"max-bottom": 200
},
throttle: 100,
handler: fn
});
<!DOCTYPE html>
<html>
<head>
<title>Hello world!</title>
</head>
<body>
<!-- some HTML things here -->
<div class="scrollable"></div>
$(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() {
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');