Skip to content

Instantly share code, notes, and snippets.

💼
Available for hire

Fortunato Estorgio estorgio

💼
Available for hire
View GitHub Profile
@estorgio
estorgio / scheduling.js
Created Mar 12, 2020
Scheduling using setInterval
View scheduling.js
let lastRun = 0;
function runTask() {
// Insert code to run on schedule
console.log('Your task has been executed!');
}
function checkSchedule() {
const hour = new Date().getHours();
const minute = new Date().getMinutes();
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active Aug 3, 2020
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)
View Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@estorgio
estorgio / prettier-eslint-precommit.md
Last active Jul 21, 2019
Setting up Prettier and ESLint with pre-commit hook
View prettier-eslint-precommit.md

Setting up Prettier and ESLint with pre-commit hook

  • Initialize Git repository
    git init
  • Create .gitignore file and add the following:
    node_modules/
    *.env
    
@estorgio
estorgio / markdown.md
Last active Jan 31, 2019
Markdown cheat sheet
View markdown.md

Header 1

Header 2 wakku

Header 3

italic bold strikethrough

Quoted Text

@estorgio
estorgio / getcookies.js
Last active Jan 27, 2019
Get all cookies in a page
View getcookies.js
document.cookie.split(';').map(entry => {
const key = entry.slice(0, entry.indexOf('=')).trim();
const value = entry.slice(entry.indexOf('=') + 1).trim();
return {
[key]: value
};
});
@estorgio
estorgio / lottogen.js
Created Oct 10, 2018
Lotto Number Generator
View lottogen.js
function generateLottoNumbers(count, maxNumber) {
let numbers = [];
let draw = [];
for (let i = 1; i <= maxNumber; i++) {
numbers.push(i);
}
for (let i = 0; i < count; i++) {
let drawnNumber = numbers.splice(Math.floor(Math.random() * numbers.length), 1)[0];
draw.push(drawnNumber);
}
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md
Last active Aug 5, 2020
Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS
View Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md

Update 28 July 2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Update 23 May 2020: This guide is ALREADY OUTDATED and might no longer work with new versions of Ubuntu and VirtualBox. Please consider switching to the updated guide instead. I will no longer respond to the replies to this gist. Thank you.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

You can’t perform that action at this time.