I am terrible at keeping on top of my camera roll. I take pictures, they sync to the cloud, I forget them. Every time I try to sort them it is just such a huge undertaking that I give up. Enter Move-ByDate: Now I can tackle my camera roll one month at a time. And …
Tag Archives: snippet
Embedding dynamicly named JavaScript in WordPress
A quick snippet to enqueue a directory of JavaScript files in a WordPress template.
FTP upload all recently modified files
I’ve been doing some development on a WordPress site recently. Due to limitations of the hosting environment, deploying from git is not an option – I have had to FTP the changed files to the staging server to test my changes. Since I don’t know PHP I am redeploying files repeatedly with minor fixes. To …
Self Elevating PowerShell cmdlet
Sometimes you need to run a script as an administrator. It’s a simple enough process to start an Administrator PowerShell window, but you still need to navigate to the path required etc etc. Since there isn’t a simple sudo command for PowerShell one way to handle the permissions is to use a self-elevating script. [code language=”powershell”] …
Paths in PowerShell
Dealing with paths and filenames can be a pain. Invalid characters, trailing slashes, relative paths can all cause scripts to fail. Here are a few tricks for managing paths in PowerShell. Clean a string Get an absolute path Cleverly concatenate paths