Skip to content

Instantly share code, notes, and snippets.

View xdhmoore's full-sized avatar

Daniel Moore xdhmoore

View GitHub Profile
@xdhmoore
xdhmoore / changeorientation.ps1
Last active March 17, 2023 08:43
Various POCs for changing windows wallpapers, lockscreen wallpapers, screen orientation, etc. with powershell
# These files are code I wrote years ago to change windows 7 wallpaper, etc. with powershell.
# It's been several years since I've used most of them and they may not have been tested on windows 10 or powershell core.
# In particular the Lockscreen code and PoshWinRT dependency do not work w/o powershell core without modifications.
# They were written only for my use and are thus pretty rough. But...it took me a bit of research to get them working and
# they did work at some point (for varying values of "work"). A lot of the content is copied and adapted from blog posts
# I've found, but which at this point I don't remember the source in order to give any attribution.
# Anyway, maybe someone will find them useful. They are here by request, but without any cleanup or polish.
# A few functions require pre-existing files to exist at particular locations on the file system.
# Use at your own risk!
@xdhmoore
xdhmoore / not-working-tensorflow.compat.v1.log
Created December 14, 2020 23:02
Pylance Language Server Logs
[Info - 10:47:02 PM] Pylance language server 2020.12.2 (pyright 6feebac9) starting
[Info - 10:47:02 PM] Server root directory: /root/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist
[Info - 10:47:02 PM] No configuration file found.
[Info - 10:47:02 PM] Setting pythonPath for service "root": "/usr/bin/python3"
Search paths found for configured python interpreter:
/usr/lib/python3.6
/usr/lib/python3.6/lib-dynload
/root/.local/lib/python3.6/site-packages
/usr/local/lib/python3.6/dist-packages
/usr/lib/python3/dist-packages
@xdhmoore
xdhmoore / toggle_displays.bash
Created September 9, 2020 13:32
Bash script to swap monitor configurations
#!/usr/bin/env bash
# Sometimes mac os assigns different ids to external monitors. The ids can swap back and forth (based on
# the order in which they are attached?). When the ids of two displays are switched, it's impossible
# (as far as I know) to determine which external monitor id goes with which physical device. Instead,
# this script just assumes the ids are backwards and switches the configuration for them.
# After all, you are calling the scripit, so something must be wrong...
#
# Note that this script depends heavily on the text output of displayplacer, so it may be somewhat brittle...
@xdhmoore
xdhmoore / Dockerfile
Created June 19, 2020 00:49
Minimal test of tensorflow image on Windows
FROM tensorflow/tensorflow:1.15.0
COPY test-tf.py /tensorflow/test-tf.py
WORKDIR /tensorflow
@xdhmoore
xdhmoore / SmartArchive.vba
Created May 1, 2019 04:03
Smart Archive for Outlook
' Smart Archive - moves all of the selected emails to the archive folder appropriate for that email instead of
' just moving them to the default email account's archive folder.
' Note that you'll need to change the hardcoded email addresses & Archive folder names.
Sub MoveSelectedToArchives()
Dim myOlApp As New Outlook.Application
Set sel = myOlApp.ActiveExplorer.Selection
Dim mi As mailItem
Set mi = myOlApp.ActiveExplorer.Selection.item(1)
@xdhmoore
xdhmoore / index.html
Created February 25, 2014 16:22
A Pen by Daniel Moore.
<!-- Angular Implementation -->
<div class="example1" ng-app>
<h2>Todo - AngularJS</h2>
<div ng-controller="TodoCtrl">
<span>{{remaining()}} of {{todos.length}} remaining</span>
[ <a href="" ng-click="archive()">archive</a> ]
<ul class="unstyled">
<li ng-repeat="todo in todos">
<input type="checkbox" ng-model="todo.done">
<span class="done-{{todo.done}}">{{todo.text}}</span>
@xdhmoore
xdhmoore / AngularJS---examples.markdown
Created February 24, 2014 22:27
A Pen by Daniel Moore.