Skip to content

Instantly share code, notes, and snippets.

View paulodiovani's full-sized avatar

Paulo Diovani Gonçalves paulodiovani

View GitHub Profile
@paulodiovani
paulodiovani / 0000-setting-and-big-issues.md
Last active October 20, 2023 18:19
Reign of Storms (FATE RPG)

Reinos de Tempestades

Campanha de FATE Condensed utilizando as regras para magia Stormcallers.

Questões da última sessão

  • Evento/Reunião dos reinos e Acordo para discutir a guerra
@paulodiovani
paulodiovani / install-instructions.md
Created August 30, 2022 16:59 — forked from crispyricepc/install-instructions.md
wlprop - An xprop clone for wlroots based compositors

Dependencies

Make sure you have installed the following commands:

  • swaymsg
  • jq
  • slurp
  • awk

Installation

@paulodiovani
paulodiovani / error.test.mjs
Last active July 7, 2021 15:49
Testing throwing errors with mocha.
import { expect } from 'chai'
// usage:
// npm install mocha chai
// npx mocha error.test.mjs
describe('catching Error in test', () => {
it('this test must pass', () => {
const fn = () => {
throw new Error('expected error')
@paulodiovani
paulodiovani / compress_pdf.sh
Created March 8, 2021 16:09
Compress/optimize PDF file
#! /bin/bash
# AUTHOR: (c) Ricardo Ferreira
# NAME: Compress PDF 1.4
# DESCRIPTION: A nice Nautilus script with a GUI to compress and optimize PDF files
# REQUIRES: ghostscript, poppler-utils, zenity
# LICENSE: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# WEBSITE: https://launchpad.net/compress-pdf
# Messages
@paulodiovani
paulodiovani / 001-mage-the-ascension-to-fate.md
Last active March 9, 2021 20:20
Mago a Ascensão para FATE Condensed

the mage powered by FATE

Mago a Ascensão para FATE Condensed

v0.1.0

Este documento apresenta regras simplificadas para jogar Mago a Ascensão em FATE Condensed, fortemente inspiradas em Stormcallers do FATE System Toolkit e Dresden Files Accelerated.

@paulodiovani
paulodiovani / java-hibernate-sqlite.md
Last active March 12, 2020 13:27 — forked from rppowell-lasfs/java-hibernate-sqlite.md
Java Hibernate-Sqlite Simple Example 2018-04-22

Java Hibernate/Sqlite Example

Dependencies

// https://mvnrepository.com/artifact/org.hibernate/hibernate-core
compile group: 'org.hibernate', name: 'hibernate-core', version: '5.2.16.Final'

// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.21.0.1'
@paulodiovani
paulodiovani / example.sh
Last active November 5, 2019 18:56
Vim 8 as Git Submodules
# make the pack folder a git repository
cd ~/.vim/pack
git init
# add as many plugins as you want in the desired
# package directories
# for example, lets add NERDtree and its git plugin
# as autoloaded in plugins/ directory
git submodule add https://github.com/scrooloose/nerdtree plugins/start/nerdtree
@paulodiovani
paulodiovani / Gemfile
Last active June 8, 2018 16:25
Arrange Matrix by Diagonals -- OMG
source 'https://rubygems.org'
gem 'rspec'
@paulodiovani
paulodiovani / using_async_await.js
Last active April 25, 2018 16:26
Example of progressive rollback
/*
* Example of handling promises with progressive rollback
* Usage: node using_async_await.js 5
*/
// await doesn't work in global scope, must wrap
(async function() {
const errored = process.argv[2] //get from command line argument
function timeout(ms) {
@paulodiovani
paulodiovani / excuses.txt
Created April 19, 2018 17:10 — forked from fortytw2/excuses.txt
programming excuses
Actually, that's a feature
Don't worry, that value is only wrong half of the time
Even though it doesn't work, how does it feel?
Everything looks fine my end
How is that possible?
I broke that deliberately to do some testing
I can have a look but there's a lot of if statements in that code!
I can't make that a priority right now
I can't test everything
I couldn't find any examples of how that can be done anywhere else in the project