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 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');
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 scrollable.html
<!DOCTYPE html>
<html>
<head>
<title>Hello world!</title>
</head>
<body>
<!-- some HTML things here -->
<div class="scrollable"></div>
View instance.js
var s = new Steady({
conditions: {
"width": 400,
"min-top": 50,
"max-bottom": 200
},
throttle: 100,
handler: fn
});
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 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 meta.html
<meta http-equiv="X-UA-Compatible" content="IE=edge">
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.
@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'
@lafikl
lafikl / cssspecificity.css
Created Nov 22, 2012
CSS specificity example
View cssspecificity.css
ul li a {
color: red;
}
.item {
color: blue;
}
/* item will win! */
You can’t perform that action at this time.