Skip to content

Instantly share code, notes, and snippets.

View plembo's full-sized avatar

Phil Lembo plembo

View GitHub Profile
@plembo
plembo / SpecJavaForApacheDS.md
Last active August 8, 2018 21:02
Specify Java for Apache Directory Studio

Specify Java for Apache Directory Studio

The current version Apache Directory Studio, 2.0.0-M13, is built on Oracle Java 8. It can be made to run on Java 9, but does not work on either Oracle Java 10 or OpenJDK 10.

To specify that it use OpenJDK 8 on Linux, edit ApacheDirectoryStudio.ini to add the following lines to the top of the file:

-vm
/usr/lib/jvm/java-8-openjdk-amd64/bin/java
@plembo
plembo / LetsEncrypt389DS.md
Last active October 7, 2024 13:40
Let's Encrypt 389 Directory Server

Let's Encrypt the 389 Directory Server

The following procedure is for installing a wildcard cert and key paid from Let's Encrypt for the 389 Directory Server.

  1. Use the 389 Console gui to create a certificate database db and to import the Let's Encrypt certificate chain cert (which will be in PEM format). See secs. 9.1.3.2 and 9.3.3.2 of the Red Hat Directory Server Administration Guide for details.

  2. Create a pin.txt file under /etc/dirsrv/slapd-[instance name]:

Internal (Software) Token:agoodpassword
@plembo
plembo / ESLintForAtomOnLinux.md
Last active August 20, 2018 15:19
ESLint for Atom on Linux

ESLint for Atom on Linux

ESLint is a linter for ECMAScript.

A basic configuration file, .eslintrc, that should be placed in the root of a project folder (this can be setup globally, but that could result in inacurrate linting when working with multiple versions of ES). The example configuration is for ES6.

{
 "extends": "eslint:recommended",
@plembo
plembo / ClearingCachedRedirects.md
Last active August 20, 2018 19:22
Clearing cached redirects

Clearing Cached Redirects

How to clear a cached 301 redirect once you've gone there?

Can't be done, you say, short of deleting your browser user configuration and starting over?

Well, not quite. But close.

Google Chrome

The Chrome developers apparently don't want you to ever succeed in this, because they don't provide an obvious way to do it, and from all the different solutions I tried, seem to be actively closing off various solutions

@plembo
plembo / FixColorsUbuntuWSL.md
Last active December 26, 2018 17:25
Fix colors for Ubuntu on WSL

Fix the colors for Ubuntu on WSL

Recipe for making the Ubuntu on Windows Subsystem for Linux look like a real Ubuntu terminal, including that eggplant purple background.

Taken from:

James Garijo-Garde, Make Bash on Ubuntu on Windows 10 Look Like the Ubuntu Terminal (2017), retrieved August 23, 2018.

  1. After launching the Ubuntu bash shell, click on the upper left corner of the terminal... Properties... Colors.
@plembo
plembo / OpenSSLcertsForApache.md
Created October 23, 2018 15:35
OpenSSL certs for Apache

OpenSSL certs for Apache

Make new openssl-server.cnf under /etc/pki/tls to include Subject Alternative Names:

openssl-server.cnf

HOME = .
RANDFILE = $ENV::HOME/.rnd
@plembo
plembo / openjdk-official.md
Last active November 13, 2018 16:39
OpenJDK Official Downloads
@plembo
plembo / InstallRUbuntu1804.md
Created November 13, 2018 16:30
Install Current R on Ubuntu 18.04 LTS

Installing the current version of R on Ubuntu 18.04 LTS

Many older sources describe adding the open source R project repo for xenial (16.04) to do this. That's just wrong, and will result in installation errors.

Instead, clean everything out with an "apt remove --purge", "apt autoremove", "apt update" and "apt upgrade". Then remove any line for cloud.r-project.org in /etc/apt/sources.list. Finally, add the now released repo for bionic (18.04):

sudo apt-add-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
@plembo
plembo / NodeJSonLinux.md
Last active March 1, 2019 16:36
Installing Node.js on Linux

Installing Node.js on Linux

There are two different approaches here: the "per user" install that developers like best, and the legacy "global" install favored by most server admins. Both these methods work on Ubuntu 16.04 and 18.04 LTS.

Using NVM

This installation method lets you manage multiple versions easily, and does not require root privileges.

The nvm script uses git to download the specified version of node (the default is "current") that lives in the $HOME/.nvm of the user.

@plembo
plembo / getaduserqueries.md
Created November 17, 2018 05:23
Example Get-ADUser Queries

Example Get-ADUser Queries

Connect to Azure AD:

Connect-ADUser

Query for all attributes: