Skip to content

Instantly share code, notes, and snippets.

View connerk's full-sized avatar

Kevin Conner connerk

View GitHub Profile
@connerk
connerk / SQL-Inserts-execute-each.sql.js
Last active October 1, 2019 17:47
DataGrip Export Scripts
var MyTable = "{{MYTABLE}}";
var NEWLINE = "\r\n";
function eachWithIdx(iterable, f) { var i = iterable.iterator(); var idx = 0; while (i.hasNext()) f(i.next(), idx++); }
function mapEach(iterable, f) { var vs = []; eachWithIdx(iterable, function (i) { vs.push(f(i));}); return vs; }
function output() { for (var i = 0; i < arguments.length; i++) { OUT.append(arguments[i]); } }
$sysfunctions = gci function:
function myfunctions {gci function: | where {$sysfunctions -notcontains $_} }
Set-Alias -name d -Value dotnet -Description "Easier to type DotNet"
$gitgetter = Invoke-WebRequest("https://gist.githubusercontent.com/connerk/dc13bddf110b36cad1a1d5d91c6c6f41/raw/6e2ad502eb967b06f493e8c8fdd5639675ec8051/Git-Getter.ps1")
Invoke-Expression $gitgetter.content
#launch GitKraken in current folder
function krak() {
@connerk
connerk / RangeTools.bas
Last active November 14, 2017 21:48
VBA Favorites
Public Function convertColumnNumberToLetter(columnNumber As Integer) As String
Dim dividend As Integer
dividend = columnNumber
Dim columnName As String
Dim modulo As Integer
Do While (dividend > 0)
modulo = (dividend - 1) Mod 26
columnName = Chr$(65 + modulo) + columnName
dividend = (dividend - modulo) / 26
@connerk
connerk / Git-Getter.ps1
Last active March 31, 2017 22:02
Powershell Git Helpers
function Get-GitRepoStatusRecursing {
[CmdletBinding()]
Param (
[Parameter(Position=1,
ValueFromPipelineByPropertyName=$true)]
[string]$directory = (Get-Item -Path ".\" -Verbose).FullName,
[string[]]$ignoredFolders = @(".git","node_modules","Past Payrolls","Benefits","_Archive", `
"e-Time Data","Compensation Plans","DCH Pay Plan Files",`
"Payroll Additional Functions","Payroll eFiles"),
[switch]$showErrors = $false,

Keybase proof

I hereby claim:

  • I am connerk on github.
  • I am dilligaf (https://keybase.io/dilligaf) on keybase.
  • I have a public key whose fingerprint is A5EA 7BF3 797C B6D6 922B 7F8F 772C A7AE 1F6E 24C0

To claim this, I am signing this object:

@connerk
connerk / fun_BinarySearch.bas
Last active June 25, 2021 11:38
VBA Binary search allowing multiple fields
Option Explicit
Option Compare Text
Public Function BinarySearch(inArray As Variant, hasHeader As Boolean, ParamArray WhatValueWhatColumn() As Variant) As Long
'== =============================================================================================================
'== https://gist.github.com/connerk/5f5c94def05bca777fede63a7322b718
'== conducts a binary tree search in a 1 or 2 dimensional array
'==
'== looks for matches defined in 'WhatValueWhatColumn'
'== supports matching of multiple columns.
@connerk
connerk / 0_reuse_code.js
Created February 18, 2016 16:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console