Skip to content

Instantly share code, notes, and snippets.

param([switch]$all, [int]$top)
Push-Location $PSScriptRoot
# Eureka takes longest. start first in new window, takes a while, lots of continual Eureka output
"Launching Eureka startup in another process"
Invoke-Expression 'cmd /c start powershell -NoProfile -Command { .\eureka-start.ps1 }'
""
# Start Spring Cloud Config server for Producer and Consumer configuration.
#!/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
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
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
<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"
<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" />
<configSections>
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
</configSections>
<!-- ... -->
System.Data.SqlTypes.SqlNullValueException was unhandled by user code
HResult=-2146232015
Message=Data is Null. This method or property cannot be called on Null values.
Source=System.Data
StackTrace:
at System.Data.SqlClient.SqlBuffer.get_Int32()
at System.Data.SqlClient.SqlDataReader.GetInt32(Int32 i)
at HibernatingRhinos.Profiler.Appender.ProfiledDataAccess.ProfiledDataReader.GetInt32(Int32 ordinal)
at System.Data.Entity.Core.Objects.Internal.ShapedBufferedDataRecord.ReadInt(DbDataReader reader, Int32 ordinal)
at System.Data.Entity.Core.Objects.Internal.ShapedBufferedDataRecord.Initialize(DbDataReader reader, DbSpatialDataReader spatialDataReader, Type[] columnTypes, Boolean[] nullableColumns)