Skip to content

Instantly share code, notes, and snippets.

View exabrial's full-sized avatar

Jonathan S. Fisher exabrial

View GitHub Profile
@exabrial
exabrial / gpg-agent.conf
Created August 5, 2019 19:27 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
$ ls /opt/sonatype/sonatype-work/nexus3/db/
OSystem accesslog analytics audit component config model.properties security
$ docker-compose exec nexus java -jar ./lib/support/nexus-orient-console.jar
CONNECT PLOCAL:/opt/sonatype/sonatype-work/nexus3/db/component admin admin
REBUILD INDEX *
REPAIR DATABASE --fix-graph
REPAIR DATABASE --fix-links
REPAIR DATABASE --fix-ridbags
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@exabrial
exabrial / junit4-expected-to-junit5-assertThrows.md
Created July 27, 2020 18:13
Regular Expression to Match Junit4 "expected=" tests and convert them to Junit5 "assertThrows()->" tests in Eclipse

Search for this in Eclipse:

(?s)\t@Test\(expected = (\w+\.class)\)\r?\n\tpublic void (test\w+\(\)) (?:throws \w*Exception )?\{(\r?\n\t\t.*?\r?\n\t)\}\r?\n

Replace with the following:

@exabrial
exabrial / Confirm-gitlab-email.md
Created August 6, 2020 16:34 — forked from macdja38/Confirm-gitlab-email.md
Confirm gitlab email by CLI

On your gitlab server run gitlab-rails console production

Find your user via user = User.find_by(email: "[email protected]")

Optionally change the user's email with user.email = "[email protected]" Then run user.save!

Get the user's token with user.confirmation_token

https://PutYourGitlabHere/users/confirmation?confirmation_token=PutYourTokenHere

@exabrial
exabrial / haproxy.cfg
Created November 12, 2020 15:51 — forked from phemmer/haproxy.cfg
haproxy log SSL master key
global
lua-load haproxy.lua
frontend X
tcp-request session set-var(sess.ssl_session_id) ssl_fc_session_id,hex if { ssl_fc }
tcp-request content lua.ssl-log-key if { ssl_fc }
@exabrial
exabrial / fixed-rewrite-config-prettyfaces.xsd
Created April 8, 2021 14:40
fixed-rewrite-config-prettyfaces.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013 Lincoln Baxter, III
Licensed 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
[Unit]
Description=xxx ${project.artifactId} ${project.version}
After=network.target
[Service]
Environment=SERVER_BASEPORT=${xxx.server.baseport} JAVA_HOME=/usr/lib/jvm/${runtime-jdk}
EnvironmentFile=/etc/default/${project.artifactId}
Type=simple
WorkingDirectory=/opt/${project.artifactId}
ExecStart=/usr/bin/authbind --depth 3 /usr/lib/jvm/${runtime-jdk}/bin/java -jar /opt/${project.artifactId}/${project.artifactId}-exec.jar