Skip to content

Instantly share code, notes, and snippets.

View jvrmaia's full-sized avatar
🤓
bug is feature for hackers

João Maia jvrmaia

🤓
bug is feature for hackers
View GitHub Profile
@jvrmaia
jvrmaia /
Created November 23, 2021 12:18 — forked from fabiode/☭
трудящихся мира, объединиться! Workers of the world, unite! Trabalhadores do mundo, uní-vos! Proletarier aller Länder, vereinigt euch!
#!/usr/bin/env bash
echo ' '
echo ' '
echo "☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ "
echo "================================== трудящихся мира, объединиться! ===================================="
echo "☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ "
echo ' '
echo "****************,**,*****,***,,,,,,,....,........,................................... ..............
*****,***,****,,,,,**,,**,*,,,,,,,,,.......,**,..,.............................. ...... ... .......
@jvrmaia
jvrmaia / arch-QC35-ii.txt
Created July 13, 2021 13:50 — forked from alexrios/arch-QC35-ii.txt
In order to work the Bose QC35 II Headset Bluetooth do the following
- sudo pacman -Syu pulseaudio-alsa pulseaudio-bluetooth bluez bluez-libs bluez-utils
- turn off bluetooth from your computer
- sudo btmgmt ssp of
- gpasswd -a $USER lp
- pin is always `0000`
FAQ
1 - I only hear the "call from" message
Confirm that by switching the mode from HSP/HFP to `A2DP Sink` solve the problem.
- systemctl restart bluetooth
import re
import random
import time
WORD_LIST = [
'glibc-x86_64.tar.gz',
'rock_pesado.mp3',
'spotify_64bits.tar.gz',
'firefox-x86-64.tar.gz',

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

@jvrmaia
jvrmaia / finance.md
Last active September 17, 2023 21:56
finance

patrimômio mínimo de sobrevivência (PMS)

PMS = 6 x [gastos mensais]

patrimônio mínimo recomendado para sua segurança (PMR)

PMR = 12 x [gastos mensais] caso sua empregabilidade seja alta 20 x [gastos mensais] caso sua empregabilidade seja baixa

patrimônio ideal para sua idade e situação de consumo (PI)

@jvrmaia
jvrmaia / keybase.md
Created October 26, 2017 23:36
keybase.md

Keybase proof

I hereby claim:

  • I am jvrmaia on github.
  • I am jvrmaia (https://keybase.io/jvrmaia) on keybase.
  • I have a public key ASA6QSI2quGUM2deijyUNeLmKG2MwpuwUwwucJMEVuwghAo

To claim this, I am signing this object:

@jvrmaia
jvrmaia / benchmark-commands.txt
Created November 4, 2016 18:57 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@jvrmaia
jvrmaia / li-ssl-cert.sh
Created April 9, 2015 10:57
ssl manager
#!/usr/bin/env bash
DATE=$(date +%s)
DEFAULT_KEYSTORE_STOREPASS=vmware
KEYSTORE_STOREPASS=`grep keystorePass /usr/lib/loginsight/application/etc/3rd_config/server.xml 2>/dev/null | gawk -F'"' '{print $4}' || echo ${DEFAULT_KEYSTORE_STOREPASS}`
TOMCAT=$(ls /usr/lib/loginsight/application/3rd_party 2>/dev/null | grep tomcat)
[ ! -d "/usr/lib/loginsight/application/3rd_party/${TOMCAT}" ] && \
echo >/dev/stderr "ERROR: Unable to locate Tomcat directory, you must run this on the Log Insight virtual appliance...exiting" && \
exit 255
@jvrmaia
jvrmaia / fastfib.py
Created March 26, 2015 13:02
q-matrix <3
import cProfile
def fibonacci(n):
if n < 0:
raise ValueError("Negative arguments not implemented")
print _fib(n)[0]
def _fib(n):
@jvrmaia
jvrmaia / tmux.md
Created January 19, 2014 20:34
Guia do TMUX

Guia do TMUX

obs.:

  • o guia é baseado nas minhas configurações pessoais do Github
  • C-c significa pressionar a tecla Control e em seguida a tecla c
  • Prefixo + w significa digitar o comando de Prefixo e em seguida apertar w

Linhas de comando