// install >>>
// easy way
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
// hard way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).on("scroll", function() { | |
var scrollHeight = $(document).height(); | |
var scrollPosition = $(window).height() + $(window).scrollTop(); | |
if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
// when scroll to bottom of the page | |
} | |
}); |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amcik | |
arse | |
arsehole | |
arserape | |
arsewipe | |
ass | |
asses | |
asshole | |
assholes | |
assramer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var t0 = performance.now(); | |
// | |
// @source https://gist.github.com/webolizzer/e521db1b1401080b98f06c46c837be6f | |
// | |
function get_random_guid() { | |
const POSSIBILITIES_PER_ROUND = 512; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// jQuery version | |
// @author https://stackoverflow.com/a/15977052/2337281 | |
// Example Usage: | |
// <textarea id="txt" rows="15" cols="70">There is some text here.</textarea> | |
// <input type="button" id="btn" value="OK" /> | |
// | |
jQuery("#btn").on('click', function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@@@ nginx virtual server configuration | |
### make link | |
# $ ln -s /etc/nginx/sites-available/DOMAIN_NAME.TLD /etc/nginx/sites-enabled/ | |
# $ nginx -t | |
# $ systemctl restart nginx | |
### letsencrypt | |
# $ cd /PATH_NAME/www | |
# $ mkdir _.letsencrypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<script> | |
// source https://stackoverflow.com/questions/23640869/create-thumbnail-from-video-file-via-file-input | |
document.addEventListener("DOMContentLoaded", function() { |
/**
* @author github.com/webolizzer
* You can buy me a coffee and a Kit-Kat @ paypal.me/webolizzer
* Thank you! :)
*/
// backup old DB
$ cp -a /var/lib/mysql/ /var/lib/mysql.bak
Following instructions at https://mariadb.com/kb/en/mariadb/preparing-for-columnstore-installation/ (There's also https://mariadb.com/kb/en/mariadb/installing-mariadb-deb-files/, but I didn't follow that one.)
Install
sudo apt-get -y install libboost-all-dev expect perl openssl file sudo libdbi-perl libreadline-dev libdbd-mysql-perl
cd ~
wget http://downloads.mariadb.com/MariaDB/mariadb-10.1.22/repo/ubuntu/mariadb-10.1.22-ubuntu-trusty-amd64-debs.tar
cd /opt
sudo tar -xf ~/mariadb-columnstore-tars/mariadb-10.1.22-ubuntu-trusty-amd64-debs.tar
sudo ./mariadb-10.1.22-ubuntu-trusty-amd64-debs/setup_repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### KERNEL TUNING ### | |
# Increase size of file handles and inode cache | |
fs.file-max = 2097152 | |
# Do less swapping | |
vm.swappiness = 10 | |
vm.dirty_ratio = 60 | |
vm.dirty_background_ratio = 2 |
NewerOlder