Skip to content

Instantly share code, notes, and snippets.

@bmaupin
bmaupin / upgrade-openconnect.sh
Last active August 30, 2018 14:07
Upgrade OpenConnect on Ubuntu 14.04 64-bit
# Fixes these errors on Ubuntu 14.04:
# "A TLS packet with unexpected length was received."
mkdir upgrade-openconnect
cd upgrade-openconnect
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gmp/libgmp-dev_6.0.0+dfsg-6ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gmp/libgmp10_6.0.0+dfsg-6ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gmp/libgmpxx4ldbl_6.0.0+dfsg-6ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libt/libtasn1-6/libtasn1-6-dev_4.2-2ubuntu1.1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/p/p11-kit/libp11-kit-dev_0.20.7-1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/p/p11-kit/libp11-kit0_0.20.7-1_amd64.deb
@bmaupin
bmaupin / install-swift.sh
Last active December 23, 2017 19:27
Install Swift on Ubuntu
# Recommended: use swiftenv instead of this: https://swiftenv.fuller.li/
# https://swift.org/download/#using-downloads
# Get latest Swift version from https://swift.org/download/
swift_version=4.0.3
sudo -v
# Clean up previous versions
@bmaupin
bmaupin / install-oracle-java7-centos.md
Last active March 12, 2019 14:24
Install Oracle Java 7 on CentOS
@bmaupin
bmaupin / install-openjdk-6-ubuntu-16.sh
Last active December 22, 2023 12:11
Install openjdk-6-jdk on Ubuntu/Xubuntu 16.04
# NOTE: This is a hack and will downgrade the tzdata package.
# Better alternatives:
# - Use Azul Zulu build of OpenJDK 6 (https://www.azul.com/downloads/zulu/zulu-linux/ - make sure you enable the box labeled Older Zulu versions)
# - Install Java 6 directly from Oracle and install it manually (https://gist.github.com/bmaupin/16855ce1b2484c459f41ad836a7d3f2f)
wget http://launchpadlibrarian.net/235298493/openjdk-6-jdk_6b38-1.13.10-1_amd64.deb
wget http://launchpadlibrarian.net/235298496/openjdk-6-jre_6b38-1.13.10-1_amd64.deb
wget http://launchpadlibrarian.net/235298494/openjdk-6-jre-headless_6b38-1.13.10-1_amd64.deb
wget http://launchpadlibrarian.net/235298487/openjdk-6-jre-lib_6b38-1.13.10-1_all.deb
wget http://launchpadlibrarian.net/250277191/tzdata_2016c-0ubuntu1_all.deb
@bmaupin
bmaupin / install-oracle-java6-ubuntu.md
Last active March 28, 2023 15:51
Install Oracle Java 6 on Ubuntu/Xubuntu
@bmaupin
bmaupin / log4j2.xml
Last active November 15, 2024 11:11
Log4j2.xml for Tomcat
<?xml version="1.0" encoding="utf-8"?>
<Configuration status="info">
<Properties>
<Property name="logdir">${sys:catalina.base}/logs</Property>
<Property name="layout">%d [%t] %-5p %c- %m%n</Property>
</Properties>
<Appenders>
<Console name="CONSOLE" target="SYSTEM_OUT">
<PatternLayout pattern="${layout}"/>
</Console>
@bmaupin
bmaupin / logging.properties
Last active February 3, 2021 11:00
Tomcat logging.properties for log rotation (recommended: use log4j2 instead)
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@bmaupin
bmaupin / pdfedit-docker.md
Last active October 10, 2023 15:37
Run PDFEdit in Docker (was Install PDFEdit on Ubuntu)
@bmaupin
bmaupin / minimal.html
Last active February 11, 2022 16:12
Minimal HTML 5 file
<!-- doctype is required -->
<!doctype html>
<!-- html element is optional -->
<html>
<!-- head element is optional -->
<head>
<!-- title element is required and can't be empty or blank -->
<title>Title</title>
</head>
<!-- body element is optional -->
@bmaupin
bmaupin / build-swift.sh
Last active March 12, 2017 18:49
Build Swift with Foundation on Ubuntu 14.04/16.04
# Note: the Swift binaries for Linux already include Foundation. To install them, see: https://gist.github.com/bmaupin/a1585eb29b893ac8d184
# To use Foundation, just 'import Foundation'
# If you really want to build Swift with Foundation, keep reading...
# References:
# https://github.com/apple/swift#getting-sources-for-swift-and-related-projects
# https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/GettingStarted.md#on-linux
# A lot of folders will be created for dependencies, so put them all in one subfolder to keep things organized
mkdir swift-source