Skip to content

Instantly share code, notes, and snippets.

on run {input, parameters}
do shell script "open /Applications/Preview.app"
set importFromPhoneText to "Import from iGeoff"
tell application "System Events" to tell process "Preview"
set frontmost to true
delay 2
click (menu item 1 where its name starts with importFromPhoneText) of menu 1 of menu bar item "File" of menu bar 1
#!/usr/bin/env pwsh
# ./move-ios-media.ps1 '/Users/hudgeo/Desktop/camera'
# ./move-ios-media.ps1 '/Users/hudgeo/Desktop/camera', '/Users/hudgeo/Desktop/iGeoffCamera'
param( [Parameter(Mandatory=$true)] [string[]] $directories )
Write-Host "Using Powershell $($PSVersionTable.PSEdition) v $($PSVersionTable.PSVersion)"
$logFile = "$HOME/Scripts/move-ios-media.txt"
$picsRoot = "$HOME/Pictures/By Year"; $vidRoot = "$HOME/Movies/By Year"
$preview = $false; $autoOpenPathFinder = $true
private void InstallOpenCoverFromLocalPackage()
{
var settings = new NuGetInstallSettings
{
//Source = new[] { @"..\Tools\LocalPackages\" },
Source = new[] { @"C:\Some\FullPath\Tools\LocalPackages" },
OutputDirectory = "tools"
};
@thnk2wn
thnk2wn / My-GitUtilities.psm1
Last active September 7, 2017 05:33
Misc. Git Utility Module - Help, Applying Stash by Message, Deleting Merged Branches etc.
$instructionColor = "green"
$headerColor = "yellow"
$cheatCategories = @("branch", "commit", "diff", "history", "remote", "stage", "stash", "undo")
function Get-GitCheatSheet
{
[CmdletBinding()]
[Alias("Git-Cheat")]
PARAM (
[Parameter(Mandatory=$false, Position=0)]
REM This is intended to be run only via the self-extracting zip exe created by build.
REM It copies extracted files to a known location in the event of an error, re-deploy, logging output etc.
REM It then hands off the real work to PowerShell for the deployment
@echo off
mode con cols=120
echo You are here: %~dp0
echo Copying extracted files to a known location
@echo off
if "%1" == "" goto usage
REM Expecting trailing \ on folders passed in
set artifactsFolder=%1
set folderToBackup=%artifactsFolder%deployPackage\
set zipLocation=%artifactsFolder%
set buildFolder=%~dp0
using System;
using System.Diagnostics;
using System.Linq;
using CyberCoders.Background.Diagnostics;
using CyberCodersEmailProcessor.Bounce.Data;
using CyberCodersEmailProcessor.Bounce.EmailParsing;
using CyberCodersEmailProcessor.Bounce.Exchange;
using Humanizer;
using Microsoft.Exchange.WebServices.Data;
using NLog;
<nlog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
throwExceptions="false">
<targets>
<!-- size in bytes: 10485760 = 10 MB - set to 5 for most -->
<!-- master/all/combined log file -->
<target name="asyncAllTarget"
xsi:type="AsyncWrapper"
queueLimit="10000"
timeToSleepBetweenBatches="10"
<configSections>
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
</configSections>
<!-- ... -->
<nlog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" throwExceptions="false">
<targets async="true">
<!-- size in bytes: 10485760 = 10 MB - set to 5 for most -->
<!-- master/all/combined log file -->
<target name="allTarget" xsi:type="File" fileName="${basedir}/logs/log-all.txt" layout="${time}|${level:uppercase=true}|${threadid}|${logger}|${message}" archiveAboveSize="10485760" archiveNumbering="Sequence" archiveFileName="${basedir}/logs/archive/log-all.{#####}.txt" maxArchiveFiles="3" keepFileOpen="false" deleteOldFileOnStartup="true" />
<!-- logs scheduling/job/quartz related separately -->
<target name="scheduleTarget" xsi:type="File" fileName="${basedir}/logs/log-schedule.txt" layout="${time}|${level:uppercase=true}|${threadid}|${logger}|${message}" archiveAboveSize="5242880" archiveNumbering="Sequence" archiveFileName="${basedir}/logs/archive/log-schedule.{#####}.txt" maxArchiveFiles="3" keepFileOpen="false" deleteOldFileOnStartup="true" />