Skip to content

Instantly share code, notes, and snippets.

View jkanclerz's full-sized avatar
🎯
Focusing

Jakub Kanclerz jkanclerz

🎯
Focusing
View GitHub Profile
create database databasename;
create user 'user' identified by 'password';
grant all privileges on databasename.* to 'user'@localhost identified by 'password';
grant all privileges on databasename.* to 'user'@host;
grant all privileges on databasename.* to 'user'@%;
@jkanclerz
jkanclerz / style.css
Created May 5, 2014 07:51
Fix div(element) element hight 0
#element:after, .element:after {
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
@jkanclerz
jkanclerz / form-ajax-submiter.js
Created April 5, 2014 23:54
file upload with progress bar
function progressHandler(event){
$("#kb_of_total").text("Uploaded "+Math.round(event.loaded/1024) +" kb of "+Math.round(event.total/1024));
var percent = (event.loaded / event.total) * 100;
$("#progressBar").attr('value', Math.round(percent));
$("#status").text(Math.round(percent)+"% uploaded... please wait");
}
function completeHandler(event){
$("#progressBar").attr('value', 100);
$("#status").text('Uploaded Success');
successHandler(event);
@jkanclerz
jkanclerz / form-spinner.js
Created April 5, 2014 23:47
Form submit spinner
;(function ( $ ) {
'use strict';
$(document).ready(function() {
$('form').bind('submit', function() {
$(this).find('button[type="submit"] i').attr('class', 'glyphicon glyphicon-refresh animate');
});
});
})( jQuery );
WebApp