Skip to content

Instantly share code, notes, and snippets.

View davidmdem's full-sized avatar

Dave DeMeulenaere davidmdem

  • Indiana University
  • Bloomington, IN
View GitHub Profile
@davidmdem
davidmdem / checkout-adf-design.html
Last active January 19, 2024 01:56
A basic demonstration of the Blackbaud Checkout flow for Advanced Donation Forms.
<div id="checkout-adf">
<h5>
{{fund.Name}}
</h5>
<p>
{{fund.Description}}
</p>
<hr />
Year,CPI
1925,17.5
1926,17.7
1927,17.4
1928,17.1
1929,17.1
1930,16.7
1931,15.2
1932,13.7
1933,13.0
@davidmdem
davidmdem / adjacency.tex
Created February 2, 2018 18:52
Adjacency matrix in LaTex
\begin{wrapfigure}{r}{0.5\textwidth}
\centering
\caption{Adjacency List}
\begin{tikzpicture}[>=stealth]
\matrix (M) [matrix of nodes,%
column sep=-\pgflinewidth,%
row sep=1mm,%
nodes in empty cells,
nodes={draw, fill=gray!20,%
minimum width=.5cm, outer sep=0pt,%
@davidmdem
davidmdem / Copy-WithProgress.ps1
Created April 26, 2017 19:27
Copy a whole directory to another with progress indications
#
# Copy a whole directory to another with progress indications
# https://blogs.technet.microsoft.com/heyscriptingguy/2015/12/20/build-a-better-copy-item-cmdlet-2/
#
Function Copy-WithProgress {
[CmdletBinding()]
Param (
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)] $source,
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)] $destination
)
@davidmdem
davidmdem / RandomNumberFileCreator.ps1
Last active February 6, 2017 02:41
PowerShell script to create a file full of random numbers between 0 and 1.
$file = "E:\numbers.txt"
for ($i=0; $i -le 10000000; $i++) {
$a = Get-Random -Minimum 0.0 -Maximum 1.0
Add-Content $file $a.ToString("0.00")
}
@davidmdem
davidmdem / DebuggingHadoopWordCount.md
Last active January 28, 2017 17:46
Debugging HadoopWordCount in Eclipse

Debugging HadoopWordCount in Eclipse

Create a new project

File -> New -> Java Project

Uncheck Use default location.

Use location /root/MoocHomeworks/HadoopWordCount

@davidmdem
davidmdem / Transform XML from CSV.ps1
Created August 25, 2016 14:14
Read CSV containing a column of XML data and transform XML data into new CSV.
################################################################################################################
#
# Example of XML being parsed. Each column in the CSV has one of these in its `Submission` field.
#
# <root>
# <FormField FieldID="FULL_NAME" Caption="Name" Value="Some Person"/>
# <FormField FieldID="ID" Caption="University ID" Value="0001234567"/>
# <FormField FieldID="EMAIL" Caption="Preferred Email" Value="SomePerson@gmail.com"/>
# <FormField FieldID="PHONE_CELL" Caption="Cell Phone" Value="5555659632"/>
# </root>
string emailHash;
using (var md5 = MD5.Create())
{
var sb = new StringBuilder();
var data = md5.ComputeHash(Encoding.UTF8.GetBytes("myemail@email.com"));
foreach (byte t in data)
{
sb.Append(t.ToString("x2"));
}
@davidmdem
davidmdem / Microsoft.PowerShell_profile.ps1
Created November 19, 2015 17:34
Custom PowerShell profile
##
# If the clipboard contains a directory path or a file path,
# default the cwd to that path. Otherwise, default to `D:\`.
#
# Requires PowerShell 5
##
$clip = Get-Clipboard
$location = "D:\"
if (-not ( [string]::IsNullOrEmpty($clip) ) )

Templates

These are the items used to generate new projects and specs.
You will find a ProjectTemplates and ItemTemplates folders in the SDK directory.

Project Templates

  1. Navigate to your C:\<username>\Documents\Visual Studio 2015\Templates\ProjectTemplates folder.
  2. Create a new Blackbaud AppFx folder here.
  3. Copy the conents of BlackbaudSDK\ProjectTemplates to your new Blackbaud AppFx folder.

Item Templates