This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Generate a vanilla MERGE statement for Microsoft SQL Server that performs an | |
-- upsert. You may need to further modify the generated statement to fit your | |
-- needs, but it should at least save you from typing the same fields in | |
-- quadruplicate. | |
-- | |
-- History: | |
-- 2021-04-15: Daniel Rothfus - Initial version | |
DECLARE @MergeColumns TABLE([Name] SYSNAME NOT NULL); | |
INSERT INTO @MergeColumns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Launch emacs in the Linux subsystem for Windows for a quoted filename. | |
REM Daniel Rothfus | |
REM Sept 3, 2017 | |
REM | |
REM To add Linux emacs as a right-click item in the context menu, add a registry | |
REM key at Computer\HKEY_CLASSES_ROOT\*\shell\emacs\command with the default | |
REM value "C:\...\launch_emacs.bat" "%1". Set the parent key's default value to | |
REM the entry's desired name, such as "Launch in Emacs". | |
REM | |
REM This script is an MVP and as such it probably has many edge cases around |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a simple wall mount for a Raspberry Pi in the case found at | |
http://www.thingiverse.com/thing:30572. This mount works by supporting the Pi | |
by its two lower corners, so that the Ethernet port and the USB ports face out | |
of the bottom of the Pi. | |
To mount supports, put the corner supports on the Pi, attach short command | |
strips to the backside of the feet, and then push the Pi with the feet up | |
against the wall. The Pi will then be able to slide in and out of the supports | |
whenever you want to attach it to the wall. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rush Hour Solver | |
# rushsolver.py | |
# Daniel Rothfus | |
# This is a fairly slow brute force solver for the game Rush Hour. This solver | |
# was inspired by http://acm2013.cct.lsu.edu/localdoc/problems-scripting/1.pdf | |
# Please note that this solver was made for Python 3, not Python 2. | |
# | |
# To use this script, first input the character that will represent the special | |
# car to remove from the right side of the grid in the following board. Next, | |
# input the board in ASCII art on the next 6 rows. Periods should be used to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Live Feed</title> | |
<script> | |
ASPECT_RATIO = 4.0 / 3.0; | |
IMAGE_SRC = "/?action=stream" | |
function initialize(){ | |
var elem = document.getElementById("liveFeed") | |
var border = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** \file derhuff.c | |
\author Daniel Rothfus | |
\version 1.0 | |
\brief A really simple Huffman implementation. | |
Derhuff is a simple utility to compress files using the Huffman coding scheme. | |
To compress a file, it analyzes the frequencies of all the bytes in the file | |
and builds a tree using these frequencies, which it writes to the output. With | |
this tree, the program then converts each byte of the input to the path to get | |
to the corresponding leaf in the tree. To decode, it just reads the tree from |