Skip to content

Instantly share code, notes, and snippets.


Jota juliojsb

View GitHub Profile
juliojsb / mysql-collectd-grafana.json
Created Jan 24, 2019
MySQL/MariaDB dashboard for Grafana (Collectd)
View mysql-collectd-grafana.json
"annotations": {
"list": [
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
juliojsb / security-dashboard-grafana.json
Created Nov 28, 2018
A simple security dashboard for Grafana
View security-dashboard-grafana.json
"annotations": {
"list": [
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
juliojsb / jvm-flags-debug
Created Jun 8, 2016
JVM Flags for debugging
View jvm-flags-debug
# Activate Automatic Heap Dump on OutOfMemory
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/location/`date +%Y%m%d`.hprof
# Activate basic GC logging
# Activate detailed GC logging
# Add Timestamps (can be used with basic or detailed GC logging)
juliojsb / avconv-usage-tips
Last active Apr 10, 2016
Some examples and tips to convert formats and record audio/video using avconv tool
View avconv-usage-tips
# ---Format conversions
# Extract audio from video file
avconv -i video.mp4 -vn -f mp3 audio.mp3
# Extract just video without audio
avconv -i video.mp4 -vcodec libx264 -an -f mp4 just_video.mp4
# Convert MP3 to WAV
avconv -i audio.mp3 audio.wav
juliojsb / create-gnome-shell-desktop-launcher
Created Apr 9, 2016
How to create a desktop launcher in Gnome Shell
View create-gnome-shell-desktop-launcher
1) In /usr/share/icons create folder SublimeText and move the corresponding icon there (can be a .png)
2) In /usr/share/applications/sublimetext.desktop create a file called sublimetext.desktop and put in it:
[Desktop Entry]
Name=Sublime Text
Comment=A Sublime way of editing text
juliojsb / optimize-firefox-iceweasel
Last active Apr 9, 2016
Some tips to optimize Firefox/Iceweasel web navigators
View optimize-firefox-iceweasel
These tips worked for me, but use always with caution!
In about:config modify the following.
# Pipelining and network optimizations
network.http.pipelining.maxrequests 8
network.http.pipelining true
browser.display.show_image_placeholders false
network.http.max-persistent-connections-per-server 8
browser.cache.use_new_backend 1
juliojsb / Jboss configuration file
Created Mar 23, 2016
Enable remote debugging in Jboss
View Jboss configuration file
For Jboss 4,5,6 AS and 6.x EAP standalone mode, append to your JAVA_OPTS the following option:
For Jboss 7.x AS/EAP 6.x in domain mode, in host.xml add the corresponding jvm option in the server group you need to debug:
<server name="server-one" group="main-server-group">
<!-- Remote JPDA debugging for a specific server
<jvm name="default">
juliojsb / sysctl.conf
Created Mar 23, 2016
Disable IPv6 in Debian and derivative distros (like Ubuntu)
View sysctl.conf
Put in /etc/sysctl.conf the following:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
After that, reload config with:
sysctl -p
juliojsb /
Last active Jul 22, 2022
Allow multicast communications in iptables
Run the following:
iptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT
iptables -A FORWARD -m pkttype --pkt-type multicast -j ACCEPT
iptables -A OUTPUT -m pkttype --pkt-type multicast -j ACCEPT
iptables -A INPUT -s -j ACCEPT
iptables -A FORWARD -s -d -j ACCEPT
juliojsb / httpd.conf
Created Mar 19, 2016
Hardening Apache security with TLS and secure ciphers order
View httpd.conf
Put this at Apache main configuration level (httpd.conf or apache2.conf) or even at VirtualHost level.
To enable only TLS (in all its versions):
SSLProtocol all -SSLv2 -SSLv3
SSLCompression off
SSLHonorCipherOrder on
If you want to enable only TLS v1.2: