Skip to content

Instantly share code, notes, and snippets.

\documentclass[12pt]{extarticle}
\usepackage[a4paper,landscape,margin=0.70in]{geometry}
\usepackage{fontspec}
\usepackage{upquote}
\usepackage{microtype}
\usepackage{multicol}
\usepackage{textcase}
\usepackage{mfirstuc}
\usepackage[hidelinks]{hyperref}
@jeromerobert
jeromerobert / pandoc-svg.py
Last active September 1, 2023 09:05
Pandoc filter to create PDF files from SVG
#! /usr/bin/env python
"""
Pandoc filter to convert svg files to pdf as suggested at:
https://github.com/jgm/pandoc/issues/265#issuecomment-27317316
"""
__author__ = "Jerome Robert"
import mimetypes
import subprocess
@alessandroleite
alessandroleite / cert.java
Last active March 2, 2024 00:41
Generate a self signed X509 certificate with Bouncy Castle
//Generate a self signed X509 certificate with Bouncy Castle.
// StringBuilder sb = new StringBuilder();
//
// for (int i = 0; i < pub.length; ++i)
// {
// sb.append(Integer.toHexString(0x0100 + (pub[i] & 0x00FF)).substring(1));
// }
//
// System.out.println(sb);
// sb.setLength(0);
@wsargent
wsargent / genca.sh
Last active May 7, 2021 15:16
Generate a certificate authority and trust anchor keystore, using only keytool
#!/bin/bash
export PW=`cat password`
# Create a self signed key pair root CA certificate.
keytool -genkeypair -v \
-alias exampleca \
-dname "CN=exampleCA, OU=Example Org, O=Example Company, L=San Francisco, ST=California, C=US" \
-keystore exampleca.jks \
-keypass:env PW \
// File: custom_ostream.cpp
// Created: 9/2013
// Author: Vaclav Zeman
//
//
// Copyright (C) 2013, Vaclav Zeman. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modifica-
// tion, are permitted provided that the following conditions are met:
//