Skip to content

Instantly share code, notes, and snippets.

View sneycampos's full-sized avatar

Silvio Ney sneycampos

  • Portugal
  • 10:24 (UTC)
View GitHub Profile
@sneycampos
sneycampos / backup.sh
Created November 1, 2024 15:51 — forked from revant/backup.sh
MariaDB Backup + Restic
# Video: https://youtu.be/b-KFj8GfvzE
# Full Backup
mariadb-backup --backup \
--user=$DB_ROOT_USER \
--password=$DB_ROOT_PASSWORD \
--target-dir=$BACKUP_BASE_DIR
# Incremental Backup
mariadb-backup --backup \
--user=$DB_ROOT_USER \
@sneycampos
sneycampos / infinitescroll.js
Created May 1, 2019 13:06 — forked from amitavroy/infinitescroll.js
This code is used to generate an infinite scroll. It appends the new data to the container. Need to work on providing an animation when the data is being fetched.
$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
// calling the function to get the ajax data
loadMore();
}
});
function loadMore() {
$.ajax({
url: base_url + "/infscroll/get_inf_scroll_ajax",