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
Task Add-CommonAssemblyInfo {
dir . -Recurse -filter *.csproj | Select-Object -first 2 | % {
$content = [xml](gc $_.FullName);
$ns = New-Object System.Xml.XmlNamespaceManager -ArgumentList $content.NameTable
$ns.AddNamespace('a', 'http://schemas.microsoft.com/developer/msbuild/2003')
$assemblyInfoNode = $content.SelectNodes("//a:Compile[@Include='Properties\AssemblyInfo.cs']", $ns) | select-object -first 1;
--This is how you want your queries to behave. Short and sweet, to prevent blocking
--See: http://dbareactions.com/post/112726103627/how-queries-behave-after-developers-follow-my
--Benefits:
--1.Doesn't block other users.
--2.Easy to read and understand quickly
--3.Easy to maintain
--4.Easy to debug/test
--check first before creating our temporary tables
@dalpert-korewireless
dalpert-korewireless / ManifestResourceHelper.cs
Last active December 10, 2016 05:32 — forked from davidalpert/ManifestResourceHelper.cs
Helper code to extract resources from a C# assembly.
using System.Collections.Generic;
using System.IO;
using System.Reflection;
namespace YOUR_NAMESPACE
{
public static class ManifestResourceHelper
{
public static string[] GetManifestResourceNames(Assembly asm = null)
{
select
P.spid
, right(convert(varchar,
dateadd(ms, datediff(ms, P.last_batch, getdate()), '1900-01-01'),
121), 12) as 'batch_duration'
, P.program_name
, P.hostname
, P.loginame
from master.dbo.sysprocesses P
where P.spid > 50
public class User
{
public string login { get; set; }
public int id { get; set; }
public string avatar_url { get; set; }
public string gravatar_id { get; set; }
public string url { get; set; }
public string html_url { get; set; }
public string followers_url { get; set; }
public string following_url { get; set; }
Entered Status Left Time in State Type of Time Timespan Adjusted Time
42492.70621 Open 42502.70662 10.00:00:35.8220000 Wait 10.00041461 -10.00041461
42502.70662 In Progress 42506.8536 4.03:31:39 Work 4.146979167 4.146979167
42506.8536 Code Review 42506.86756 00:20:06 Wait 0.013958333 -0.013958333
42506.86756 Ready for QA 42517.59819 10.17:32:07 Wait 10.73063657 -10.73063657
42517.59819 In Testing 42517.62551 00:39:20 Work 0.027314815 0.027314815
42517.62551 Failed QA 42517.66536 00:57:23 Wait 0.039849537 -0.039849537
42517.66536 In Progress 42517.66567 00:00:27 Work 0.0003125 0.0003125
42517.66567 Ready for QA 42517.81193 03:30:37 Wait 0.146261574 -0.146261574
42517.81193 In Testing 42517.81461 00:03:51 Work 0.002673611 0.002673611
@dalpert-korewireless
dalpert-korewireless / prepare-commit-msg
Last active July 28, 2021 07:08
git hook script to inject the current branch name into commit comments
#!/bin/bash
#
# Called by "git commit" with
# $1 = the name of the file that has the commit message
# $2 = the description of the commit message's source:
# - 'message' (-m or -F option)
# - 'template' (-t option)
# - 'merge' (if the commit is a merge commit)
# - 'squash' (if the commit is squashing other commits)
# $3 = The SHA1 hash of the relevant commit. (Only given if -c, -C, or --amend option was given)
@dalpert-korewireless
dalpert-korewireless / prepare-commit-msg
Created January 3, 2016 02:17
git hook script to inject the current branch name into commit comments
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
@dalpert-korewireless
dalpert-korewireless / howto-manually-add-trust-cert-to-rubygems.md
Created November 19, 2015 09:57
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller)

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

// ==UserScript==
// @name JIRA Navigation Helpers
// @namespace http://blog.spinthemoose.com/
// @version 0.1
// @description Adds some helpful navigation capabilities to JIRA
// @author David Alpert
// @match https://koresystemsgroup.atlassian.net/browse/*
// @grant none
// ==/UserScript==