Skip to content

Instantly share code, notes, and snippets.

View Krasnov8953's full-sized avatar

krasnov8953 Krasnov8953

View GitHub Profile
@Krasnov8953
Krasnov8953 / gist:184662ac1278c7971986c02c95f4bfff
Created May 24, 2017 08:02
input type file appned filename to custom div
$('input[type="file"]').on('change', function (event, files, label) {
var file_name = this.value.replace(/\\/g, '/').replace(/.*\//, '')
$('.filename').text(file_name);
});
$(document).ready(function(){
$('.btn_blue').click(function(e){
e.preventDefault();
var destination = $('#comments').offset().top;
$('html, body').animate({
scrollTop: destination
}, 600);
});
});
@Krasnov8953
Krasnov8953 / gist:bc35958f04f8f5054ebb18d67d8736ac
Created May 17, 2017 14:59
squeeze footer to site bottom
* {
margin: 0;
padding: 0;
}
.content {
min-height: calc(100vh - 80px);
}
tar xf fileName.tar.gz
@Krasnov8953
Krasnov8953 / gist:fb4cb9fc28841c009ca6c2e2b2f584ee
Last active May 26, 2017 10:05
zip folder on server with exclude server
zip -r bitvolution.zip bitvolution -x \*.git\*
@Krasnov8953
Krasnov8953 / gist:468691144e5df6cd955c0631d2fbf596
Created May 12, 2017 07:29
copy file from remote host via scp
scp root@serv:/home/text.php /Users/user/pathtolocalfolder/
mysqldump -uroot -proot database < dump.sql