Skip to content

Instantly share code, notes, and snippets.

View warthurton's full-sized avatar

Wayne Arthurton warthurton

View GitHub Profile
@warthurton
warthurton / clock.html
Created February 10, 2022 17:08 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals": {
"alwaysShowTabs": true,
"defaultProfile": "{79285a8e-036c-446f-8a9c-78994e34cf85}",
"initialCols": 120,
"initialRows": 30,
"requestedTheme": "dark",
"keybindings": [
{
@warthurton
warthurton / extract.wsh.js
Created April 4, 2018 20:15 — forked from Beej126/AutoUnZip.wsh.js
Windows File Explorer auto extract zips like Mac Finder
function CheckFolderExistsAndCreate(folder) {
if (fso.FolderExists(folder)) {
WScript.Echo("destination folder already exists: " + folder);
WScript.Quit(1);
}
fso.CreateFolder(folder);
}
function isBiggish(items, depth, why) {
@warthurton
warthurton / README.md
Created December 17, 2017 21:47
Windows Weather Wallpaper via NodeJs scraping a prominent web page

NodeJs Based Exercise

  1. scrape a web page
  2. transform the content
  3. render to png
  4. save to desktop wallpaper

Install

  1. save the js and cmd files to a folder...
  2. edit the url on line 32 of the js for your preferred location
  3. put WKHTMLtoImage.exe in same folder (or your global path); note: somehow the setup.exe didn't save files to my program files but simply extracting the bin folder via zip was fine
@warthurton
warthurton / !README.md
Last active October 23, 2018 15:00 — forked from Beej126/README.md
Scripted Windows 10 "Win+X" Menu (aka "Power User Menu")

Scripted Win+X shortcuts

Using this in tandem with ListShortcuts.csx becomes a simple scripted backup/restore mechanism for porting your favorite WinX shortcuts to other machines, etc.

sample usage:

  • scriptcs ListShortCuts.csx -- "%LOCALAPPDATA%\Microsoft\Windows\WinX\Group3" > FaveLinks.md
  • scriptcs WinXCreate.csx -- FaveLinks.md

handy nuggets:

  • WinX GUI Tool
  • WinX folder: cd %LOCALAPPDATA%\Microsoft\Windows\WinX
@warthurton
warthurton / stuff_to_del.bat
Created May 30, 2017 18:20 — forked from Gaspadlo/stuff_to_del.bat
Fastest possible way to delete large number of files/folders for MS Win (thousands to millions of folders)
@echo off
set /p Input=Enter Folder name to delete:
:ConfPromt
set /p Confirm=Are you sure you want to delete "%CD%\%Input%"?(y/n):
IF /I "%Confirm%" == "n" (
Echo Canceling.
pause
EXIT /b
)
IF /I NOT "%Confirm%" == "y" (
@warthurton
warthurton / play_all_voices.sh
Last active August 29, 2015 14:26 — forked from ttscoff/play_all_voices.sh
A quick Bash loop to play all available voices for OS X say command
#!/bin/bash
# Arguments can include a quoted string to define the test string to be repeated
# If an argument is numbers only, it changes the rate at which to speak (words per minute, default 200)
play_all_voices() {
local voice
local rate=200
local test_string="How are you?"
for arg in $@; do
if [[ $arg =~ ^[0-9]+$ ]]; then
@warthurton
warthurton / pinboard-full.js
Created December 13, 2011 01:39 — forked from BenWard/pinboard-full.js
A smarter bookmarklet for Pinboard.in; wraps selected text in <blockquote> tags, keeps variables out of the global scope, supports filling tags from rel="tag" markup in the page, and titles from hAtom entry titles.
(function() {
// Change `silent` to true to invoke the promptless, self-closing
// version of the bookmarklet.
var silent = false;
var url = location.href;
var title = document.title;
// Look for a single hAtom entry on the page, and iff one is found, extract
// the entry-title in place of the document title: