Skip to content

Instantly share code, notes, and snippets.

View lantrix's full-sized avatar
:octocat:
always coding and merging

Ted B lantrix

:octocat:
always coding and merging
View GitHub Profile
@lantrix
lantrix / Microsoft.PowerShellISE_profile.ps1
Last active August 17, 2017 02:38 — forked from juntalis/Fix-Indentation.ps1
Cheap workaround to allow using tabs for indentation in ISE.
$psISE.Options.ShowOutlining = $true
$psISE.Options.ShowDefaultSnippets = $true
$psISE.Options.ShowIntellisenseInScriptPane = $true
$psISE.Options.ShowIntellisenseInConsolePane = $true
#
Set-Variable -Option AllScope -Name OptionSetter -Value (&{
$ClassName = 'IndentFixer'
$Namespace = 'ISEHijack'
@lantrix
lantrix / Route 53 Updater
Created August 27, 2018 04:39 — forked from hsiboy/Route 53 Updater
BASH Script to keep Route53 updated with your current external IP address
Roll your own dynamic DNS service using Route53
function Test-ADCredential {
<#
.SYNOPSIS
This PowerShell function takes a user name and a password as input and will verify if the combination is correct.
The function returns a boolean based on the result.
.PARAMETER Credential
PS Credential Object.
.EXAMPLE
@lantrix
lantrix / dnsupdate.sh
Last active March 1, 2022 18:39 — forked from TonyFNZ/dnsupdate.sh
Script to update Route53 with the current public IP of an instance
#!/bin/bash
hosted_zone_id='Z57Q212345678'
domain_name='server.example.com'
# Abort script on any errors
set -e
# Get new IP address
ip_address=$(curl -s http://169.254.169.254/latest/meta-data/public-ipv4)
@lantrix
lantrix / New-ErrorRecord.ps1
Created June 21, 2019 05:48 — forked from wpsmith/New-ErrorRecord.ps1
PowerShell: Creates an custom ErrorRecord that can be used to report a terminating or non-terminating error.
<#
.Synopsis
Creates an custom ErrorRecord that can be used to report a terminating or non-terminating error.
.Description
Creates an custom ErrorRecord that can be used to report a terminating or non-terminating error.
.Parameter Exception
The Exception that will be associated with the ErrorRecord.
@lantrix
lantrix / refresh-music-selection.scpt
Created July 3, 2023 12:00 — forked from Kautenja/refresh-music-selection.scpt
An applescript to refresh the metadata of a selection in the Apple Music application (with progress bar)
tell application "Music"
-- get the selection
set theSongs to selection
end tell
-- setup the progress bar
set theSongCount to length of theSongs
set progress total steps to theSongCount
set progress completed steps to 0
set progress description to "Refreshing Songs..."

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs