Skip to content

Instantly share code, notes, and snippets.

View dalpert-korewireless's full-sized avatar

David Alpert dalpert-korewireless

  • KORE Wireless
  • Winnipeg, Manitoba
View GitHub Profile
<UserSettings><ApplicationIdentity version="12.0"/><ToolsOptions><ToolsOptionsCategory name="Environment" RegisteredName="Environment"><ToolsOptionsSubCategory name="RoamingSettings" RegisteredName="RoamingSettings" PackageName="Roaming Manager Package">
<PropertyValue name="SyncEditor">true</PropertyValue>
<PropertyValue name="SyncAppearance">true</PropertyValue>
<PropertyValue name="RoamingEnabled">true</PropertyValue>
<PropertyValue name="SyncStartup">true</PropertyValue>
<PropertyValue name="SyncAliases">true</PropertyValue>
<PropertyValue name="SyncKeyBindings">true</PropertyValue>
</ToolsOptionsSubCategory><ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package"><PropertyValue name="ShowMiscFilesProject">false</PropertyValue><PropertyValue name="AutoloadExternalChanges">false</PropertyValue><PropertyValue name="CheckForConsistentLineEndings">true</PropertyValue><PropertyValue name="SaveDocsA
@dalpert-korewireless
dalpert-korewireless / .gitattributes
Created March 17, 2015 14:48
A sample gitattributes file
# Disable git's line-ending normalization
# (which tries to store all line endings as LF in the repo)
# b/c we are into and out of TFS and with other devs who
# all work in Windows (i.e. with CRLF)
#
# more info:
# - Git-TF -> Recommended Git Settings:
# https://gittf.codeplex.com/wikipage?title=Recommended%20Git%20Settings
#
# - Git-TFS -> Wrong EOL (LF) in files commited to TFS
robocopy [from] [to] /MIR
REM http://ss64.com/nt/robocopy-exit.html
IF %%ERRORLEVEL%% EQU 0 (
ECHO No errors occurred, and no copying was done; The source and destination directory trees are completely synchronized.
EXIT 0
)
IF %%ERRORLEVEL%% EQU 1 (
ECHO One or more files were copied successfully, new files have arrived.
EXIT 0
@dalpert-korewireless
dalpert-korewireless / .gitconfig
Last active August 29, 2015 14:23
Git Aliases
[alias]
st = status
ci = commit
cie = commit --allow-empty
cim = commit -m
ciem = commit --allow-empty -m
call = !git add -A && git commit --allow-empty
callm = "!sh -c 'git add -A && git commit --allow-empty -m $1' -"
@dalpert-korewireless
dalpert-korewireless / Program.cs
Created August 2, 2015 05:59
Per-Instance logging with NLog & TopShelf
using System;
using System.Timers;
using FubuCore;
using NLog;
using NLog.Layouts;
using NLog.Targets;
using Topshelf;
using Topshelf.Runtime;
namespace Dragon.WindowsService
$> git bisect run cmd //C c:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe build.xml //t:build
member x.FindFileDepth (d:DirectoryInfo) (f:FileInfo) =
Math.Max(f.FullName.Replace(d.FullName, "").Split('\\').Length - 2,0)
member x.AddCommonAssemblyInfo() =
let xmlns = @"http://schemas.microsoft.com/developer/msbuild/2003" |> XNamespace.op_Implicit
let working = new DirectoryInfo(@"d:\path\to\repo")
let projFiles = working.GetFiles("*.csproj", SearchOption.AllDirectories)
|> Array.filter (fun f -> f.FullName.Contains(".git") = false)
using (StreamReader sr = File.OpenText(fileName))
{
string s = String.Empty;
while ((s = sr.ReadLine()) != null)
{
//do your stuff here
}
}
@dalpert-korewireless
dalpert-korewireless / OctopusHelpers.js
Last active April 9, 2021 18:34
Tampermonkey script to add UI helpers for Octopus Deploy
// ==UserScript==
// @name Octopus Helpers
// @namespace http://blog.spinthemoose.com/
// @version 0.2
// @description Adds some useful capabilities to the Octopus Deploy UI.
// @author David Alpert
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @match http://172.30.100.100/app*
// @grant none
@dalpert-korewireless
dalpert-korewireless / NavigateKORERepos.js
Last active August 29, 2016 20:57
TamperMonkey script to help navigate between the KORE.* repos on github
// ==UserScript==
// @name Navigate KORE Repositories
// @namespace http://blog.spinthemoose.com/
// @version 0.5
// @description updates to support Refined Github
// @author David Alpert
// @match https://github.com/*/*
// @require http://code.jquery.com/jquery-latest.js
// @grant none
// ==/UserScript==