Skip to content

Instantly share code, notes, and snippets.

View jamesperrin's full-sized avatar
✝️
Learning

James Perrin jamesperrin

✝️
Learning
View GitHub Profile
##################################################################################
#
# Purpose: To registry proxy SSL certificate with Fortify Java.
# OS: Windows
# Terminal: PowerShell
#
# James Perrin, @jamesperrin | https://github.com/jamesperrin
# Licensed under CC0-1.0 (https://creativecommons.org/publicdomain/zero/1.0/)
##################################################################################
::*********************************************************************************
::
:: Title: RunAs Smartcard User Script
::
:: Purpose: This script runs a selected program as a Smartcard User
::
:: Note: The Windows service "Secondary Logon" needs to running for script to work.
::
:: To run service:
::
import os
import shutil
import errno
# def copyanything(src, dst):
# try:
# shutil.copytree(src, dst)
# except OSError as exc: # python >2.5
# if exc.errno == errno.ENOTDIR:
# shutil.copy(src, dst)
<#
::##################################################################################
::#
::# Purpose: To configure HTTP Strict Transport Security (HSTS) Window Server versions 2019 with IIS 10.
::# OS: Window Server versions 2019 with IIS 10
::# SEE: https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-10-version-1709/iis-10-version-1709-hsts#iis-100-version-1709-native-hsts-support
::#
::# James Perrin, MIT License, https://www.countrydawgg.com, | @_jamesperrin
::#
::##################################################################################
# Created by Next.js - https://gist.github.com/jamesperrin/d7d030d7e8064920fa55a75b408885e4
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
#!/bin/bash
set -m
##################################################################################
#
# Purpose: To registry proxy SSL certificate with Fortify Java.
# OS: Windows
# Terminal: Git Bash for Windows
#
# James Perrin, @jamesperrin | https://github.com/jamesperrin
@jamesperrin
jamesperrin / WindowsServerHTTPSecurity.ps1
Last active December 8, 2022 14:40
PowerShell script to configure Windows Server HTTP protocols
#Requires -RunAsAdministrator
Write-Output "Modifying system regisistry."
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Enables TLS 1.2 on Windows Server 2008 R2
# REF: https://www.derekseaman.com/2010/06/enable-tls-12-aes-256-and-sha-256-in.html
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ((Get-WmiObject Win32_OperatingSystem).Name -Match "Microsoft Windows Server 2008 R2"){
# These keys do not exist so they need to be created prior to setting values.
@jamesperrin
jamesperrin / github-labels-import.js
Last active July 17, 2023 21:10
JavaScript file for importing GitHub labels from a JSON object.
/*
Purpose: Import settings for GitHub Labels.
(c) James Perrin, MIT License, https://www.countrydawgg.com, | @jamesperrin
Importing Instructions:
1. Update the labels JSON object.
2. Open a web browser.
3. Navigate to the desired GitHub repository.
@jamesperrin
jamesperrin / github-labels-export.js
Last active July 17, 2023 21:03
JavaScript file for exporting GitHub labels to a JSON object.
/*
Purpose: Export the configuration settings for GitHub Labels.
(c) James Perrin, MIT License, https://www.countrydawgg.com, | @jamesperrin
Exporting Instructions:
1. Open a web browser.
2. Navigate to the desired GitHub repository.
3. Navigate to Issues tab.
/*
* jQuery plugin that converts value to date
* @requires https://jqueryui.com/
* @param {Node} True or False to Disable element
* @return {String} Formatted date
*/
(function ($) {
$.fn.getDateMmddyy = function () {
if (this.val() == null) {
return null;