Skip to content

Instantly share code, notes, and snippets.

View haianhnc's full-sized avatar
🌳
clear mind, clean code

haianhnc haianhnc

🌳
clear mind, clean code
View GitHub Profile
@wataridori
wataridori / laravel-quickstart-project-docker.md
Last active August 10, 2021 17:04
Running Laravel Quick Start Project easily using Docker
  • Install Docker
    • Docker for Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/
      sudo apt-get update && apt-get install -y apt-transport-https ca-certificates
      sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
      
      // Open the /etc/apt/sources.list.d/docker.list and add the following line then save it
      // Ubuntu 14.04
      deb https://apt.dockerproject.org/repo ubuntu-trusty main
      

// Ubuntu 16.04

@nathansmith
nathansmith / scroll-offset.js
Last active November 27, 2023 04:51
Check if the user is scrolled to the bottom of the page.
window.onscroll = function() {
var d = document.documentElement;
var offset = d.scrollTop + window.innerHeight;
var height = d.offsetHeight;
console.log('offset = ' + offset);
console.log('height = ' + height);
if (offset >= height) {
console.log('At the bottom');