Skip to content

Instantly share code, notes, and snippets.

Casey McGinty cmcginty

Block or report user

Report or block cmcginty

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cmcginty
cmcginty / versionbump.py
Last active Aug 12, 2017
Command-line tool for automated software version numbering.
View versionbump.py
import sys
import click
MIN_DIGITS = 2
MAX_DIGITS = 3
@click.command()
@click.argument('version')
@cmcginty
cmcginty / logitech_keymap.md
Created Apr 29, 2017
Logitech Keyboard Mappings
View logitech_keymap.md
if [ -n "${DISPLAY+x}" ]; then
  xmodmap -e "keycode 62 = Up"
  xmodmap -e "keycode 111 = Shift_R"
  xmodmap -e "add shift = Shift_R"
  xset r 62
  xset -r 111
  xmodmap -e "keycode 66 = Control_L"
  xmodmap -e "clear Lock"
  xmodmap -e "add Control = Control_L"
@cmcginty
cmcginty / linux_retro_gaming.md
Last active Aug 4, 2018
How to build a retro-gaming box with ChromeBox + Lubuntu + Retroarch
View linux_retro_gaming.md

Retro-Gaming Box (Chromebox + Lubuntu + Retroarch)

A basic guide on how to setup a Chromebox running Retroarch as a retro-gaming living room device.

Chromebox Retro

Table of Contents

@cmcginty
cmcginty / enable-mythweb-direct-download.md
Last active Dec 16, 2016
Enable Mythweb Direct Download Links on Ubuntu
View enable-mythweb-direct-download.md

Enable Mythweb Direct Download Links on Ubuntu

"The requested URL /mythweb/mythweb.pl/pl/stream/2199/1399343400 was not found on this server."

Requesting just /mythweb/mythweb.pl would download the PERL script, indicating that CGI wasn't working. To get it working, I needed to make the following changes:

  1. sudo ln -s /etc/apache2/mods-available/cgi.load /etc/apache2/mods-enabled/cgi.load

  2. In /etc/apache2/mods-available/mime.conf, add:

     AddHandler cgi-script .cgi .pl
    
@cmcginty
cmcginty / keypass-setup-and-sync.md
Last active Jan 7, 2019
KeePass2 Password Manager Settings and Auto-Synchronization
View keypass-setup-and-sync.md

KeePass2 Setup and Auto-Synchronization Guide

KeePass is a password management utility for Windows, Linux, and Mac.

The first section describes the steps needed to setup KeyPass2 in Linux and how to add FireFox and Chrome plugin integrations.

The (optional) second section documents a robust way to automatically synchronize the password DB across multiple devices.

View keybase.md

Keybase proof

I hereby claim:

  • I am cmcginty on github.
  • I am cmcginty (https://keybase.io/cmcginty) on keybase.
  • I have a public key whose fingerprint is CDEB 856B FAB2 2C72 CE62 3BB1 BA02 2962 0046 D260

To claim this, I am signing this object:

@cmcginty
cmcginty / p4-trigger-style-check.md
Last active Jan 12, 2018
Perforce Python trigger to reject unmodified files and new code with TAB indents (instead of spaces).
View p4-trigger-style-check.md

This is a working example of a Perforce submit-change trigger that can run checks on new files and new or modified lines of code.

Tested on Python2 in Linux and Windows. It does not require the P4Python API, which would probably be a little cleaner, but makes it less portable.

The install instructions are below in the Python file. Before using, the hard-coded P4 user value builds must be created on your server, or changed to a valid user. To prevent having to set the user password in the script, the builds user must be part of a group with the Timeout field set to unlimited to allow for the user to remain logged in on the server.

@cmcginty
cmcginty / gradle-deployment-descriptor-ear-plugin.md
Last active Aug 29, 2015
Gradle DeploymentDescriptor EAR Plugin
View gradle-deployment-descriptor-ear-plugin.md

Gradle DeploymentDescriptor EAR Plugin

Use this Gradle plugin to directly access the DeploymentDescriptor class internal to the EAR plugin.

// custom Gradle task for creating EAR deployment descriptors (i.e. application.xml)
// author: cmcginty@akimeka.com
import org.gradle.api.*
import org.gradle.api.file.*
import org.gradle.api.tasks.*
@cmcginty
cmcginty / powershell-non-domain-remoting.md
Last active May 8, 2019
Windows Powershell Remoting into Non-Domain Joined System
View powershell-non-domain-remoting.md

Powershell Remoting to a Non-Domain Host

  1. From an admin shell, enable PS remoting on the machine you wish to access:
New-ItemProperty -Name LocalAccountTokenFilterPolicy `
  -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System 
  -PropertyType DWord -Value 1

Enable-PsRemoting -Force
View linux-mint-upgrade.md

A General Guide to Upgrading Mint Linux

Last Updated for Mint 18

Pre-Install

  1. Backup application list
    • Menu -> Backup Tool
    • Backup software selection
    • USER/Desktop, Select All, Apply
  2. Create a new LVM partition for root
    • lvdisplay
You can’t perform that action at this time.