Skip to content

Instantly share code, notes, and snippets.

View digitalbocca's full-sized avatar
🚀
Working from home

Gabriel Bertola Bocca digitalbocca

🚀
Working from home
View GitHub Profile
@digitalbocca
digitalbocca / Tutorial.md
Created July 30, 2020 12:37 — forked from vemacs/Tutorial.md
Instructions for setting up a Spigot server using mark2 on a fresh Ubuntu Server 14.04 LTS install.

Prerequisites

  • a vswap OpenVZ VPS or a KVM/Xen/VMware VPS with Ubuntu Server 14.04 LTS installed (architecture doesn't matter), or a dedicated server
  • patience and a willingness to learn
  • approximately 10 minutes of time

Why Ubuntu LTS?

Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.

I've tried to make it as lean and unobtrusive as possible.

Defining our own base class for errors

errors/AppError.js

@digitalbocca
digitalbocca / morse.js
Created January 4, 2019 03:45 — forked from eholk/morse.js
A Morse Code generator in Java Script
// Copyright 2014–2017, Eric Holk
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@digitalbocca
digitalbocca / curl.md
Created November 13, 2018 05:38 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@digitalbocca
digitalbocca / updateNpm.bat
Created May 24, 2018 04:59 — forked from johnmcase/updateNpm.bat
Update npm on windows
rem see https://github.com/coreybutler/nvm-windows/issues/300
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == [] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version=%1
@digitalbocca
digitalbocca / comoSerChatoNowhatsapp.js
Created October 18, 2017 23:46 — forked from callmeloureiro/comoSerChatoNoWhatsapp.js
Como fazer alguém te responder no whatsapp
/*
Hoje iremos MUDAR a vida da pessoa que não te responde no whatsappp...
Que tal enviar mensagens pra ela até obter uma resposta?!
Sensacional não acha?! Mas, somos devs, correto?! Então vamos automatizar esse paranauê!
Para utilizar:
- Abra o web.whatsapp.com;
- Selecione a conversa que você quer;
- Abra o console e cole o código que está no gist;