Whilst working away this morning, I received a very pitiful look. It’s that look that we all know. The “I did something terribly wrong” kind of look. This look came with the hands of a digital camera, a small compact point and shoot. A story followed the look, as the camera was handed over to me…
Read more…
Part of our application at work sends email notifications to various uses when certain criteria are met. This is great, except testing is difficult as you really don’t want to send out mails to valid customers, so we disable relaying outbound, and the local mail server just chomps on it a bit, then decides to not deliver it and drops it to the local file system. This is great, except in a the matter of days, we have 100k message files. This becomes entirely unmanageable with Windows, so PowerShell is here to help…
Read more…
From time to time, I have to share screen shots, it’s a common task for some, especially when showing errors and the likes. This is usually fine because it can be emailed, or saved as an image file for attaching to a bug ticket. I’ve started sharing some screen shots online, which now requires a few more steps, and becomes quite time consuming, screen shot, save image, upload to some site. This is where jing came in…
Read more…
A feature I’ve long awaited in Microsoft SQL (TSQL) has been a function similar to MySQL’s REPLACE function. For those that haven’t used it, the REPLACE function allows you to do an insert of a new record, or replace an existing record if one matches the primary key. In SQL 2008, Microsoft introduced a function called MERGE. This is like REPLACE, but a whole bunch of extra goodies…
Read more…
Digging up an old post today, I helped my wife figure out why her office A/C system couldn’t be managed properly. Apparently their system connects on a specific IP address, and it wasn’t responding. It was surmised that it was caused by some work I had done fixing one of the other machines a few months ago. But after some quick digging, turns out it wasn’t. Apparently their “consultant” had a device on the network for VPN, firewall, etc, which had the same address on it. How it got the same, we don’t know, but here is how we figured it out…
Read more…
Every now and again, we have issues where a developer will have their laptop rebuilt, and forget they have files checked out in Team Foundation Server (TFS). This isn’t very helpful as sometimes they cannot undo their check outs. Visual Studio doesn’t give you access to undo a checkout in another workspace if it’s not your workspace, however the TF.exe command does. Here’s how:
tf /undo /workspace:workspacename;username $/project/path/to/file
This will happily undo the change on that particular file. If you have a whole directory to revert the changes on, that’s easy too…
tf /undo /workspace:workspacename;username /recursive $/project/path/to/directory
You must remember when reverting somebody else’s change to use the project URL, not the physical path on your local machine, otherwise you’ll get an error like this:
No pending changes were found
for <localpathname>\file.aspx
For more details on the tf.exe undo command, see the Microsoft documentation here. Full details on arguments for the tf.exe command can be found here too.
The Nubby Admin has an interesting post, and lesson learnt on the importance of monitoring. The post, titled The Wisdom of Specificity in Monitoring and Alerting. After an outage was caused due to his service provider making some DNS changes due to disk usage issues, Wesley found himself with a broken site, but monitoring didn’t report it as such.
Read more…
In a case of what I’d call security through obscurity, the Linux Poison blog has a posting up on how to hide the PHP information in your web server. The idea is that the less a potential hacker knows about a system, the better. Here, I’m going to take it one step further, and show you the impact of some other options, and what data gets hidden.
Read more…
In a follow up to @ScriptingGuys post about restarting services using VBScript, here is the same using PowerShell. I’ll probably be dragging the same onto some server monitoring stuff to get a service back up and running we’ve been having a weird issue with.
$names = Get-Content c:\temp\computers.txt
foreach($name in $names) {
$svc = Get-WmiObject Win32_Service -ComputerName $name `
-Filter "name='wuauserv'"
if ($svc.started -eq $true) {
$svc.StopService()
}
$svc.StartService()
}
This takes a file “computers.txt”, loops through the data, and uses WMI to connect to the remote machines to get the wuauserv service (or in plain English Windows Automatic Update). Easy as pie.
I frequently comment on people not making backups, and there are always plenty of examples of corporations missing the mark too (here, here, here, and here for example). The Social Networking Weblog has a post up with an offer code for Carbonite. Not quite sure on the angle for social networking in specific, but it’s good to see somebody else commenting on backups. I’ve been using BackBlaze myself for a while, used it to restore files, and it’s pretty fast too.
Backups are critical, businesses have a financial responsibility for them, whilst home backups have both financial and sentimental value. Get your backups done, get them tested regularly. There are plenty of options for both.