Skip to content

Instantly share code, notes, and snippets.

View turchinc's full-sized avatar

Chris Turchin turchinc

View GitHub Profile
@centic9
centic9 / README.md
Last active March 7, 2026 09:34
notepad++ syntax highlighting for Dockerfiles, store at something like C:\Users\[user]\AppData\Roaming\Notepad++\userDefineLangs\userDefineLang_Dockerfile.xml

Notepad++ syntax highlighting for Dockerfiles

Store userDefineLang_Dockerfile.xml at %AppData%\Roaming\Notepad++\userDefineLangs\userDefineLang_Dockerfile.xml and select Language > Dockerfile in Notepad++.

Automatically apply style

Since Dockerfile has no extension, the style is not automatically applied.

@sivel
sivel / better-ssh-authorized-keys-management.md
Last active March 4, 2026 16:39
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@turchinc
turchinc / LangInFrames.vbs
Created March 24, 2014 16:32
VBA macro to change the language of all text frames on slides in a PowerPoint presentation.
Sub LangInFrames()
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
If ActivePresentation.Slides(j).Shapes(k).HasTextFrame Then
ActivePresentation.Slides(j).Shapes(k).TextFrame.TextRange _
.LanguageID = msoLanguageIDEnglishUK
End If
Next k