Skip to content

Instantly share code, notes, and snippets.

@kevinguyer
kevinguyer / test.html
Created February 25, 2019 18:18
Hello World Html
<html>
<head>
<style>
h1 {
font-family: Calibri;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
@kevinguyer
kevinguyer / test.md
Last active February 25, 2019 18:17
Hello World Markdown

Hello World

This is content converted from Markdown!

Here's a JSON sample:

{
  "foo": "bar"
}
@kevinguyer
kevinguyer / Sleep - Pause in VBS.vbs
Created July 2, 2018 13:12
Sleep - Pause in VBS
' So simple, so elegant, so elusive. Behold its glory:
' ------------------------------------------------------------------
Sub wait_function(secs)
Dim enter_time, leave_time
enter_time = Timer
leave_time = Timer
While (enter_time + secs > leave_time)
leave_time = Timer
@kevinguyer
kevinguyer / VBS to clean up old files or folders.vbs
Created July 2, 2018 12:59
VBS to clean up old files or folders
'You can also use the archiver script if you don't want to delete them: [[VBS Script to Archive Files]]
'
'==Recursive Sub-Folder Version (the good one)==
'No idea why this was not here to begin with...
'==========================================================================
' Script to delete files that are older (based on modified date) than a particular date
' Kevin Guyer - 9/2010
'
@kevinguyer
kevinguyer / VBS Script to Archive Files.vbs
Created July 2, 2018 12:58
VBS Script to Archive Files
'This takes 2 paths, one to monitor and one to create archives in.
'Running it creates folders by day and archives files it finds by the date.created. A few tweaks could make that date.modified.
'
' SCRIPT FUNCTION
' To process daily report files into organized daily folders based on date created
' CREATED ON/BY
' Kevin Guyer 2008
OPTION EXPLICIT
@kevinguyer
kevinguyer / UrlRedirect.js
Created December 12, 2013 21:35
The following script is for the node.js platform and, if run on a server with your old host name's resolution, will intercept incoming http(s) requests, map it to your new server, allowing for site renaming and provide the user with a message as well as the new 'best guess' url to what they were trying to reach. Created to address the need to re…
// Kevin Guyer - 2013
// Node.js script to handle server (SharePoint) name changes
// This is designed to catch the use of old urls and present an infomational page with the new url to the resource
// Test with this to see URL altering: http://localhost:8080/hr/foosite/barsite/somelibrary/somedoc.pdf
// Intercept incoming port 80 or 443 (needs to operate on both) - set the port below for flavor you are running
var http = require('http');
var url = require("url");
var server = http.createServer();