Skip to content

Instantly share code, notes, and snippets.

View shawmanz32na's full-sized avatar

Kevin Shaw shawmanz32na

  • G2 Software Systems, Inc.
  • Issaquah, WA
View GitHub Profile
@shawmanz32na
shawmanz32na / Dockerfile
Last active July 11, 2023 17:18
mssql-docker with seed data
FROM microsoft/mssql-server-linux
COPY . /usr/src/app
ENTRYPOINT [ "/bin/bash", "/usr/src/app/docker-entrypoint.sh" ]
CMD [ "/opt/mssql/bin/sqlservr" ]
@shawmanz32na
shawmanz32na / normalize-gpm-downloads.py
Created November 9, 2017 20:08
Normalize Google Play Music downloads into a standard directory structure
import eyed3
# audiofile = eyed3.load("song.mp3")
# audiofile.tag.artist = u"Integrity"
# audiofile.tag.album = u"Humanity Is The Devil"
# audiofile.tag.album_artist = u"Integrity"
# audiofile.tag.title = u"Hollow"
# audiofile.tag.track_num = 2
# audiofile.tag.save()
@shawmanz32na
shawmanz32na / README.md
Last active March 2, 2017 21:28
POM snippet to use a local directory as a maven repo

Local Maven Repository

This should give you a gist of how to use a directory inside your project as a maven repository for libraries that aren't published to a public repository.

As written, this will point to the [project-root]/lib directory, which should be formatted in standard maven repository format. You'll "install" new libraries to this directory using the mvn install:install-file task.

The examples below assume we'll be installing shawmans-lib-0.1.2.jar version 0.1.2 with groupId com.shawmanz32na and artifactId lib (determined from the source, which is structured like src/main/java/com/shawmanz32na/lib/code.java).

Usage

@shawmanz32na
shawmanz32na / extract_dod_certs.ps1
Last active March 19, 2020 01:25
Powershell script to extract DoD Certificates into a complete chain (for use with Apache), individual certificate files, and a Java Keystore containing the complete certificate chain (for use with Tomcat)
# Exports the entire DoD CA Certificate chain as DoD_CAs.pem, and then exports the individual certificates to individual [CA].pem files, and imports them all into a Java Keystore called client.jks
Function Convert-DodCertBundleToIndivdualCerts {
[CmdletBinding()]
Param (
[Parameter(Mandatory=$true)]
[String]
$Path,
[Parameter(Mandatory=$true)]
[String]
@shawmanz32na
shawmanz32na / link_ivy_libs.bat
Created February 27, 2015 20:26
Create symbolic links for Ivy Libraries in the Ant Libraries directory
@shawmanz32na
shawmanz32na / dl-file.php
Last active June 26, 2019 10:08 — forked from hakre/dl-file.php
Multisite implementation of @hakre 's dl-file.php. All the credit goes to him.
<?php
/*
* dl-file.php
*
* Protect uploaded files with login. Handles the case when a multisite user is valid but doesn't have access to this blog/site.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+