Skip to content

Instantly share code, notes, and snippets.

@ddpruitt
ddpruitt / instructables.sort.add.instructable.to.collection.alphabetically.user.js Simple user script (Greasemonkey ready) to sort alphabetically list of collections shown when “Add to Collection” button is clicked by the instructable on www.instructables.com. By default this list is sorted by collection's creation date.
// ==UserScript==
// @name Instructables: sort “Add Instructable to Collection” list alphabetically
// @namespace thebodzio
// @include /^https?://www.instructables.com/id/.*/
// @version 1
// @grant none
// ==/UserScript==
// Returns the UL element holding all the LIs with collections names
// or "null" if it's not found
@ddpruitt
ddpruitt / introrx.md
Created February 1, 2016 16:06 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@ddpruitt
ddpruitt / ObservableSerialPort.cs
Created February 3, 2016 04:05 — forked from jen20/ObservableSerialPort.cs
Start of a nice Observable wrapper for serial devices for a WPF app
using System;
using System.IO;
using System.IO.Ports;
using System.Reactive.Linq;
namespace ObservableSerialPort
{
public class ObservableSerialPort : IObservable<string>
{
private readonly string _portName;
@ddpruitt
ddpruitt / index.html
Created November 15, 2016 20:18 — forked from arisetyo/index.html
Dynamic Real-time Chart Using Chart.js, Socket.io, and Knockout.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Galenic">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/knockout-2.1.0.js"></script>
<script src="js/Chart.js"></script>
<link rel="stylesheet" href="pure-min.css">
Red Science:
0eNqdmttu6zYQRf9Fz1YhXhX7Vw4OCkVhE6K6QZLbBkH+vcqxnTQNHc/ik2Gb3kOtGc6F8Etx3x3DNMdhLQ4vRWzHYSkOP16KJT4OTff22fo8heJQxDX0xa4Ymv7t3dLGMLShnJr2z1IVr7siDg/hn+KgXn/uijCscY3hpPTrzfPvw7G/D/O24F2jWZbQ33dxeCz7pn2KQyj1ZmEal+3H4/BmexMs613xvL3ozcYc2jglzX8xo9/N/NEsa7nOzbBM47yW96FbE1bsyYrZrDzEzc7pO5tQNlDZJJV9Qtl+Vj5uROfHedxer2nrtPbu4rTxuE7HNcXHQTdUWV7wn58oDkuY1+2LL/LpB9EJyZpCMjcYxeEKorvPlpapi2ty8+fY0b+52z7es+hx4uBR1btyHx7isS9Dt62fY1tOYxe+SvuLdEpMsW3W4tOjPg5mN24h99RsDnz4JjLKMwIlQGCk4XYR1bfjTVnI9XLgdRKsy8seSkDW56U8iXSdJ60F0ndin+nkfpM++zhlS990Xdk1/XQ16SQdpelxet9dSgweJyN+Uq2zlAWO0bDOyaNJ26wcmHaTk4aPk+/P0xLjk1QFJUbXWXlW386FWnyu6u8Cdy9V8d+omCqv51Os2TAKpv/q9vkymeVKUK2MESWpcy5Ng7VZ1USQV0xenaoE7XNemZIo0yqlUzSSyrRISSJrn9WBwzNhK+nOLw5MidCZ7aQFZwVLj5oYtTVw//4r6jiPQ/kYmrn8+ymELvkANqdiCgLb0sN4ykGCbtz6LGVB+2DzWkZBZbN3WcrJOcfupTPeOcGJZjxXZSUiwZDnYCNZKrGyztqzIBKcgZ10dd1fzsIckXx+/XZHtcbufEH1/ye7+xhmz7bacWjnsIZfp/7Kcs2WK7S8QquZNtu4lErNINYMYs0g1ghijSDWCGKNIHoG0TOInkH0CKJHED2C6BFExyA6BtExiA5BdAiiQxAdgmgZRMsgWgbRIogWQbQIokUQDYNoGETDI
@ddpruitt
ddpruitt / ODataEntityFrameworkModelBuilder.cs
Created June 7, 2017 19:03 — forked from dariusclay/ODataEntityFrameworkModelBuilder.cs
How to build OData IEdmModel from Entity Framework model
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Data.Entity;
using System.Data.Entity.Core.EntityClient;
using System.Data.Entity.Infrastructure;
using System.Diagnostics;
@ddpruitt
ddpruitt / Example.cs
Created January 24, 2018 14:42 — forked from aluanhaddad/Example.cs
C# Observable HTTP
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Collections.Immutable;
using System.Linq;
using System.Net.Http;
using System.Reactive;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Joins;
using System.Reactive.Linq;
@ddpruitt
ddpruitt / backup.ps1
Created September 26, 2018 20:24 — forked from Fireforge/backup.ps1
Powershell backup script using Robocopy
#
# ROBOCOPY Script
#
# This script calls robocopy over a few folders, and then emails you when they're done
Param(
[Parameter(Mandatory=$true)]
[string]$basesrc, #"G:\",
[Parameter(Mandatory=$true)]
[string]$basedst, #
@ddpruitt
ddpruitt / get_installed_programs.ps1
Created September 26, 2018 20:27 — forked from Fireforge/get_installed_programs.ps1
Script to get list of installed programs seen in Control Panel
# Script adapted from the answers in this thread:
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/1fd035f3-a170-4721-a6b5-d4809ca2e39d/getting-list-of-installed-software-that-matches-control-panels-addremove-programs-or-programs?forum=winserverpowershell
# Formatting taken from:
# https://www.howtogeek.com/165293/how-to-get-a-list-of-software-installed-on-your-pc-with-a-single-command/
if (!([Diagnostics.Process]::GetCurrentProcess().Path -match '\\syswow64\\')) {
$unistallPath = "\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
$unistallWow6432Path = "\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\"
@(
@ddpruitt
ddpruitt / gist:d9f4ce67c2e550847980d65aed466da9
Created September 27, 2018 11:04 — forked from Starefossen/gist:319f36ff30694a775806
Resize VirtualBox .vmdk disk
# http://www.midwesternmac.com/blogs/jeff-geerling/resizing-virtualbox-disk-image
# Clone the .vmdk image to a .vdi.
vboxmanage clonehd "virtualdisk.vmdk" "new-virtualdisk.vdi" --format vdi
# Resize the new .vdi image (30720 == 30 GB).
vboxmanage modifyhd "new-virtualdisk.vdi" --resize 30720
# Optional; switch back to a .vmdk.
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk