Skip to content

Instantly share code, notes, and snippets.

Working from home

Mario Idival marioidival

Working from home
Block or report user

Report or block marioidival

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
marioidival /
Created Aug 8, 2019 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


marioidival /
Created Mar 4, 2019
Slides (patat) da alfabetização python.

title: Programação 101 author: Mário Idival ...

Antes de começar

  • Abra um arquivo de texto - ou um caderno - para anotação.
  • Interrompa caso tenha duvida em qualquer coisa que aparecer.
  • Anote a dúvida da outra pessoa.
marioidival /
Last active Aug 1, 2018
Actix DBZ Scouter

ACTIX Dragon Ball Scouter

  • The "system" send RaisePower to Fighters, this "trigger" they to raise your Ki until Scouter stop the event loop.[1]
  • The result of [1] is a Ki of Fighter, this Ki is send to Scouter.
  • The Scouter just verify if : Ki > 9000, if true, Scouter just stop the event loop System::current().stop();

I'm trying 2 way...

  • 1° just execute action (RaisePower) to one fighter and blocked the event loop
  • 2° just execute action (RaisePower) to all, but once.
View error.log
resp: 245
resp: 246
resp: 247
resp: 248
resp: 249
resp: 250
resp: 251
resp: 252
resp: 253
resp: 254
marioidival /
Last active Apr 6, 2018
Solve challenges in Rust
/// Found palindrome numeric
fn is_palindrome_numeric(n: String) -> bool {
n == n.chars().rev().collect::<String>()
fn main() {
for i in 1..20 {
if is_palindrome_numeric(format!("{}", i)) {
println!("{}", i)
marioidival /
Last active Mar 13, 2018
Aula Estrutura de dados, 13 March, 2018
import java.lang.Object;
import java.util.ArrayList;
// TODO: implement EPilhaVazia, EPilhaCheia
// TODO: use cap attribute
public class HelloWorld
public static void main(String[] args)
QueueArray qe = new QueueArray(5);
marioidival /
Created Feb 19, 2018 — forked from bruth/
Postgres push notification

Postgres push triggers

Watch a table for changes and push a notification with a payload describing the change.


In the Postgres shell:

-- Create the functions

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea

View Backup, restore postgres in docker container
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
You can’t perform that action at this time.