Skip to content

Instantly share code, notes, and snippets.

View cspinetta's full-sized avatar
👨‍💻
I may be slow to respond.

Cristian Spinetta cspinetta

👨‍💻
I may be slow to respond.
View GitHub Profile
@cspinetta
cspinetta / ab-netty-client
Created August 11, 2017 20:59
AB tool built with Netty Client
package kamon.netty
import java.lang
import io.netty.bootstrap.Bootstrap
import io.netty.channel._
import io.netty.channel.nio.NioEventLoopGroup
import io.netty.channel.socket.SocketChannel
import io.netty.channel.socket.nio.NioSocketChannel
import io.netty.handler.codec.http.{HttpContent, LastHttpContent, _}
@cspinetta
cspinetta / Cargo.toml
Created June 25, 2017 21:58
currently with compile failed
[package]
name = "toy-load-balancer"
version = "0.1.0"
authors = ["Cristian Spinetta <[email protected]>"]
[dependencies]
log = "0.3"
#env_logger="0.4.3"
pretty_env_logger = "0.1"
@cspinetta
cspinetta / select-all-inputs-in-siga-survey.js
Last active July 15, 2016 19:01
For quickly completion the SIGA Survey: Open the Developer Tool of your browser (press F12), go to the Console Tab and Run this script (in 2 separated steps) to get your convenient options selected in all fields.
// First enable JQuery on the page
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// Then, (After Jquery is in page) select your default option
var selectValue = '100%';
$('body > div > div > form > div > div:nth-child(6) > table')
.find('select > option')
.filter(function () { return $(this).html() == selectValue; })
@cspinetta
cspinetta / decompile-java-classes-cfr
Last active June 4, 2021 17:50
An script to decompile multiple java classes with CFR Java Decompiler: http://www.benf.org/other/cfr/
#!/usr/bin/env bash
# USAGE: ./decompile-java-classes.sh -d {cfr jar} -i {input directory} -n {fiel name pattern} -o {output directory}
# Output directory and file name is optional
# File name accepts wildcard such as '*'
OUTPUTDIR="/tmp/decompiled-classes/"
FILE_NAME="*"