Skip to content

Instantly share code, notes, and snippets.

danwagnerco /
Last active January 7, 2024 15:04
WifeyAlpha recommended reading
danwagnerco /
Created June 22, 2015 20:43
This is a Windows-specific walkthrough for installing Vim, Vundle and ConEmu

Vim, Vundle and ConEmu on Windows

Let's start by getting it out on the table: Sublime Text is great, and version 3 should no longer be considered "abandonware" as of build 3065. Sublime Text served me very, very well over the years. That said, trying out new things is a major part of leveling-up, and in that vein Vim deserves a go. (And have you seen some of those thoughtbot guys flying around in Vim? It's awesome!)

Getting Vim up-and-running on your Windows machine doesn't have to be an all-day project. In this post, we'll walk through:

  • Installing gVim, which gives us both the "classic" command line version as well as the graphical version
  • Installing Vundle, the best way to handle Vim-enhancing packages
  • Installing ConEmu, a supercharged command line emulator for Windows
danwagnerco / delete_rows_fast_with_autofilter.vb
Last active November 29, 2022 07:09
This short script deletes rows IN A HURRY by leveraging Range.Autofilter
View delete_rows_fast_with_autofilter.vb
Option Explicit
Public Sub DeleteRowsFastWithAutofilter()
Dim wksData As Worksheet
Dim rngDataBlock As Range
Dim lngLastRow As Long, lngLastCol As Long
'Set references up-front
Set wksData = ThisWorkbook.Sheets("data")
danwagnerco /
Created January 28, 2022 02:48 — forked from ih2502mk/
Quantopian Lectures Saved
danwagnerco / _vimrc
Last active June 11, 2021 09:28
A starter _vimrc file for Vim 8.0 and vim-plug on Windows 10
View _vimrc
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
danwagnerco / combine_sheets_with_different_headers.vb
Created July 8, 2016 04:44
This script combines many sheets into a single sheet even when the columns on each sheet are different (or are in different order)
View combine_sheets_with_different_headers.vb
Option Explicit
Public Sub CombineSheetsWithDifferentHeaders()
Dim wksDst As Worksheet, wksSrc As Worksheet
Dim lngIdx As Long, lngLastSrcColNum As Long, _
lngFinalHeadersCounter As Long, lngFinalHeadersSize As Long, _
lngLastSrcRowNum As Long, lngLastDstRowNum As Long
Dim strColHeader As String
Dim varColHeader As Variant
Dim rngDst As Range, rngSrc As Range
danwagnerco / insert_new_rows_based_on_values.vb
Last active February 16, 2021 00:24
This script loops BACKWARDS through a block of data, applying logic and noting which rows mandate a new row insert. It then loops through the collected "insert" rows, applying the final logic
View insert_new_rows_based_on_values.vb
Option Explicit
Public Sub InsertNewRowsBasedOnValues()
Dim wksData As Worksheet
Dim lngLastRow As Long, lngIdx As Long, _
lngStudentCol As Long, lngItemCol As Long, lngNetAmtCol As Long, _
lngPreviousAmtCol As Long, lngNewAmtCol As Long, _
lngReversalCol As Long
Dim varRowNum As Variant
Dim colRowNumsForInsert As Collection