Skip to content

Instantly share code, notes, and snippets.

View estorgio's full-sized avatar
💼
Available for hire

Fortunato Estorgio estorgio

💼
Available for hire
View GitHub Profile
@estorgio
estorgio / prettier-eslint-precommit.md
Last active March 19, 2024 11:19
Setting up Prettier and ESLint with pre-commit hook

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 / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active March 17, 2024 12:13
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

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 / Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md
Last active March 8, 2024 17:34
Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

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)

@estorgio
estorgio / recaptcha_laravel_9.md
Created November 8, 2022 02:58
How to setup reCAPTCHA in Laravel 9.

How to setup reCAPTCHA in Laravel 9.

  • Create config/recaptcha.php configuration file.
    <?php
    return [
        'site_key' => env('RECAPTCHA_SITE_KEY', null),
        'secret_key' => env('RECAPTCHA_SECRET_KEY', null),
        'theme' => env('RECAPTCHA_THEME', 'light'),
    ];
@estorgio
estorgio / scheduling.js
Created March 12, 2020 10:25
Scheduling using setInterval
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 / markdown.md
Last active January 31, 2019 10:37
Markdown cheat sheet

Header 1

Header 2 wakku

Header 3

italic bold strikethrough

Quoted Text

@estorgio
estorgio / getcookies.js
Last active January 27, 2019 18:04
Get all cookies in a page
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 October 10, 2018 16:19
Lotto Number Generator
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);
}