Skip to content

Instantly share code, notes, and snippets.

View dylanlangston's full-sized avatar
🧙‍♂️
Mastering the Art of Full Stack Sorcery

Dylan dylanlangston

🧙‍♂️
Mastering the Art of Full Stack Sorcery
View GitHub Profile
// ==UserScript==
// @name Auto Toner
// @namespace https://gist.github.com/dylanlangston/66f42a82bf5d81e0250aaa71f59074ca/raw/dbaf409138102f83082f220e83429f087faaf437/auto_toner.user.js
// @description Auto populates fields.
// @version 1
// @grant none
// @include http*://www.printerecycling.com/*
// ==/UserScript==
document.getElementById('ctl00_Main_CbConfirmTerms').checked = true;
document.getElementById('ctl00_Main_TextLoginTransactionNo').value = '2013.100.4.65334';
@dylanlangston
dylanlangston / timesheet.user.js
Created November 7, 2016 22:57
Timesheet forward
// ==UserScript==
// @name Time Sheet forward.
// @namespace https://gist.github.com/dylanlangston/ad343a08f6aef431125a1f02683c3a2a/raw/8bfcd09e3d23dc06f5b6d15ff3b2df8d5827a998/timesheet.user.js
// @include https://its-src.unl.edu/home
// @version 1
// @grant none
// ==/UserScript==
window.location.replace('https://its-src.unl.edu/timecard/timesheet');
@dylanlangston
dylanlangston / newtab.user.js
Created December 20, 2016 18:53
Homepage Google focus fix
// ==UserScript==
// @name New Tab Autofocus Respect
// @description Forces Firefox to Respect new tabs autofocus.
// @author Dylan Langston
// @namespace https://gist.github.com/dylanlangston/f0f0a6b6a73f7e14b4b51c712a8f6861/raw/429d375ab2c95c3386c94561bbd945645ede6745/newtab.user.js
// @version 1.0
// @run-at document-start
// @include about:blank?newtabpage
// @grant none
// ==/UserScript==
@dylanlangston
dylanlangston / xkcd.py
Created April 23, 2020 13:07
xkcd comic browser, wrapper for xkcd module.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Very Basic Python Script to browse XKCD comics.
- Dylan Langston"""
# XKCD module
import xkcd
# Argument parser module
@dylanlangston
dylanlangston / mood.py
Created April 23, 2020 13:09
Get the current average mood from twitter using WeFeel
#!/usr/bin/env python
import urllib.request
from builtins import print
import urllib.error
import re
import os
import json
import fnmatch
import time
@dylanlangston
dylanlangston / multipage.ps1
Created April 23, 2020 13:10
Powershell script to check if tifs in folder are multipage
$Folder = Read-Host -Prompt 'Input folder to check for Tifs: '
[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null
Get-ChildItem $Folder -Filter *.tif |
Foreach-Object {
$a = [System.Drawing.Bitmap]::FromFile( $_.FullName )
if ($a.GetFrameCount( [System.Drawing.Imaging.FrameDimension]::Page ) -gt 1 )
{ "`"" + $_.FullName + "`" Tiff is multi pages" }
@dylanlangston
dylanlangston / recreate-pvcsdoc.ps1
Created April 23, 2020 13:12
Powershell script to recreate PaperVision Capture .PVCSDOC files
# Section prompts for PVCSINFO File
$validfile = 0
while ($validfile -eq 0)
{
set-variable -name batchfile -value (Read-Host -Prompt 'Type Path of .PVCSINFO file')
set-variable -name batchpath -value (Split-Path -Path $(Get-Variable batchfile -ValueOnly) -Parent)
set-variable -name batchname -value (Split-Path $(Get-Variable batchpath -ValueOnly) -Leaf)
foreach ($line in $batchfile) {
$extn = [IO.Path]::GetExtension($line)
if ($extn -eq ".PVCSINFO" )
@dylanlangston
dylanlangston / screenshot.ps1
Created April 23, 2020 13:31
Powershell Script to take screenshots
## This script was quickly hacked together in my free time. It's funcional but something like this should just be a c# application instead of a powershell script.
# Tested only on Windows 10 64bit. Most likely will not work on older versions of windows due to Powershell 4.0 specific commands.
# Dylan Langston 2019
#Gets/Sets the default parameters.
Param (
[System.IO.DirectoryInfo]$Path = "$env:USERPROFILE\Pictures\Screenshots",
[string]$BorderColor = "Red",
[string]$File = "Screenshot_$(get-date -Format 'dd-MM-yyyy_hhmmss')",
@dylanlangston
dylanlangston / screenshot.ps1
Last active July 25, 2023 06:50
Powershell Script to take screenshots
#Requires -Version 3.0
# -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Script: Screenshot.ps1
# Version: 5.0
# Author: Dylan Langston
# Comments: This script was hacked together in my free time and is provided as is. It's intended to be a method of quickly taking license removal screenshots but could be used in many workflows.
# Tested only on Windows 10 64bit but should (at least kinda) work on any windows machine with Powershell 3.0 or higher.
# Date: 4/2020
# -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@dylanlangston
dylanlangston / pve-soap-test-Program.cs
Last active July 24, 2020 16:25
Simple C# program for sending and receiving APIs to PaperVision Enterprise, useful as a reference. Uses older HttpWebRequest instead of prefered HttpClient.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Xml;
using System.IO;
using System.Text.RegularExpressions;
namespace dlangston
{