Skip to content

Instantly share code, notes, and snippets.

View flozano's full-sized avatar

Francisco A. Lozano flozano

  • Kii corporation
  • Valencia, Spain
View GitHub Profile
@flozano
flozano / MonBuffers.java
Created March 24, 2022 10:23 — forked from t3rmin4t0r/MonBuffers.java
Monitoring direct memory in the JVM (from https://blogs.oracle.com/alanb/entry/monitoring_direct_buffers, adapted for JDK8)
import java.io.File;
import java.util.*;
import java.lang.management.BufferPoolMXBean;
import java.lang.management.ManagementFactory;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.*;
import com.sun.tools.attach.VirtualMachine; // Attach API
@flozano
flozano / GitHub protocol comparison.md
Created September 15, 2020 12:50
A comparison of protocols offered by GitHub (for #git on Freenode).

Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.

Protocols to choose from when cloning:

plain Git, aka git://github.com/

  • Does not add security beyond what Git itself provides. The server is not verified.

    If you clone a repository over git://, you should check if the latest commit's hash is correct.

@flozano
flozano / .gitconfig
Created September 15, 2020 12:49 — forked from Kovrinic/.gitconfig
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
@flozano
flozano / mkcacerts
Last active May 9, 2018 14:02 — forked from jimblom/certs.sh
Update Java cacerts - enforce JKS type
#!/bin/sh
# Script provided by http://www.linuxfromscratch.org/blfs/view/svn/general/openjdk.html#ojdk-certs
# EB 20141217: removed bashisms
# Simple script to extract x509 certificates and create a JRE cacerts file.
get_args()
{
if test -z "${1}" ; then
showhelp
exit 1