I have several file-system operations I cannot perform during the day, the machine’s performance would suffer and I would get angry e-mails. So I have to schedule simple move operations.
Now I could do this with Windows’ own task scheduler but I would have to write either a vbscript or a batch file to specify the details. Performing a dry run also sucks. Apparently there’s no dedicated software that gives a new “Schedule Move” or “Schedule Copy” context operation (hint: I’ll develop one once I have beaten Grand Theft Auto V) for quick use, so I started experimenting.
It seems the amazing SyncBackSE fits the bill. I already own a license for this great piece of wizardry to perform sync operations between multiple machines and backup my files. Turns out you can configure a new, one-time job to be your scheduled file mover:
- Create a new backup profile and choose the directory above the one you want to move.
- Choose “Select Subdirectories and Files” to specify the directory/directories you want to move.
- Now select your target directory.
- Add a schedule
- As a condition set “Move file to target”
SyncBackSE will automatically move your file, produce a nice log for you to review and even allows for a dry run.
Vector Magic is pretty cool. I loved the project back in the days when everyone could use it for free and was happy to see that they started providing a desktop client after going commercial. Even better: The client is utilizing Qt so we have a Windows and a Mac version. But nothing for Linux.
Don’t fret, of course you can run this application with Wine:
The only thing to notice here is that you need to set your Windows version to Windows 98, otherwise the application will always go haywire when loading a picture.
All features are working perfectly, no native DLLs needed.
If you’re using a recent KDE version you’ll notice that Wuala’s Copy & Paste feature doesn’t really seem to work anymore. Instead of using the contents you specify within the application (say, files and folders) it’ll always use the contents of Klipper.
That’s pretty annoying if you don’t know that the contents does indeed come from Klipper. So, just clear your Klipper history and you should be fine.
Microsoft often delivers free-to-test disk images of their products (like, for instance, the new Visual Studio 2010 CTP). These images are – who would have expected that? – in Microsoft’s own VirtualPC format. Luckily, the specs for the disk format are available and you can use the VMware Converter to just convert it into a vmdk (or use it directly, which I can’t really recommend).
Upon installing the VMware Tools, though, you’ll notice that the mouse gets stuck in the lower right corner of the screen if you didn’t remove the VirtualPC tools beforehand. Quite annoying, isn’t it? This comment describes how to solve the problem:
- Fire up regedit, navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetContro lClass.
- Within the keys under Class look for a value named UpperFilters, containing the value “msvmmouf”.
- Remove “msvmmouf” from the value and reboot your VM.
To add a wildcard domain (i.e. *.subdomain.mydomain.domain) all you really need to do is set up a new vhost in the Apache config and use the matching ServerName and ServerAlias:
That’s it, you can easily utilize and parse all subdomains below subdomain.mydomain.domain now.
Okay, now this is really really bad, starting with MySQL 5 there is a strict mode. What does that mean? The strict mode will not silently swallow all your data and just cut off what’s left but throw an exception back at you when you try to insert more data than the field type allows.
Sweetcron is really vulnerable for this kind of problem. It always stopped fetching the feeds to complain about a single post. Now, while fixing the problem on the software side would be preferrable I opted for a simple configuration change on the server side this time.
All you really need to do is altering the my.ini line that activates the strict mode:
will either become
Simply restart the MySQL service afterwards and sweetcron should eat the posts without complaining (I don’t even want to think about the loss of data here, but who cares?).
Far Cry 2 comes with a nasty copy protection. Actually, it’s more like a strict DRM variant that needs to be activated online and can only be used X times when not properly deactivating it.
You can manually revoke an activation without uninstalling the game by simply calling:
Easy, huh? I’d prefer Ubisoft to not use any of these bugger DRM crap at all, but then again we all know the story of software piracy (note: pirates probably have a better version without this crap, so this whole thing is totally beyond the point anyway!).
As I wrote earlier this week one of my disks kept dying on me. The solution – of course – is to replace the faulty device with a brand-new one and move the data to the new disk.
While I had great success in doing so with Acronis True Image’s “Clone Disk” feature I had a little hickup while mounting the disk into the storage cage of my case. So for the time being I had to use the broken drive for another 2 days (don’t do this at home, kids!). As you can imagine the data became desynchronized and since I didn’t really have the time to clone the disk again I opted for another, more time saving method.
Everyone knows how to pack an entire system, store it somewhere in the network and restore it – all thanks to Linux live CDs and my good ol’ friend tar. tar is great for a lot of reasons: It processes .files, it keeps permissions and ownership intact… oh yeah, and it packs things.
So, this time I didn’t need to pack my entire system but only a few selected folders. And I didn’t really need to pack them either. But tar makes a great companion for moving sensitive data between disks, no less. Just start your machine in single user mode (or with a Live CD if you plan on moving your root partition around), mount target/destination, cd into the directory you want to move and use this nifty little command:
tar cd - . | (cd /my/new/home; tar xvpf -)
Yep, that’s all that is to it. Keeps all properties intact, which is important for, well, just about any kind of file/folder.
Gee, sometimes I really want to push my router down a cliff: It runs out of memory and generally slow. Automatic reboot sounds like a good idea there…
Just add this as a startup script to reboot the router at 01:00AM:
echo '00 01 * * * root /sbin/reboot' > /tmp/cron.d/rebootrouter
Easy to do, powerful feature.
There are many things vi can do, for instance invoke other commands to process files. That’s pretty cool.
Since installing Okteta isn’t always an option, here’s a small snippet on how to work simple capabilities into vi:
vi -b myfile
[in vi]: %!xxd
[to return to previous view]: %!xxd -r
Pretty easy, pretty handy. Something to keep in mind. Another thing to keep in mind: Always open binary files with the -b switch, otherwise you’ll damage the files when saving them with vi.
If you’ve been a constant reader of my blog (and of course I know you are 😉 ) you could hardly have missed the ugly “0” date in the archives. Turns out that this 0 date was caused by all the old drafts I had saved but never published. Deleting the drafts would help, but simply assigning them a date seemed like a more sane solution. Voila, problem solved.
One of the very packages I always install when I have to work with Windows is Cygwin. Being able to use my beloved GNU tools really makes things easier. Often I don’t have the option to install it. I grieved a little bit about the fact that some problems could be solved with just 2 commands that were — of course — missing from Windows’ horrendous command prompt. So I snooped around and built the following batch that’ll start a full-blown Cygwin session from i.e. portable harddisk:
@echo off set PATH=%CD%bin;%CD%sbin;%CD%usrsbin;%PATH set HOME=%CD%homePortable mount -bfu %CD%/ / mount -bfu %CD%bin /usr/bin mount -bfu %CD%lib /usr/lib cd %HOME% bash ----login -i
Easy, huh? All you have to do to make it work is renaming your /home/Username to /home/Portable (or simply adjust the setting in the batch). Pretty neat stuff.
Since my vacation is coming to an end I thought I’d leave a nice little trick on how to administrate a number of environment variable additions for all users on the system.
Sure, there is the /etc/environment file but it seems rather limiting to me. I needed a little more control, so I came up with the following the little scripting:
Create a new folder /etc/environment.imports, in the folder just have a ordered/leveled number of scripts (i.e. 01_qt, 02_java). Add the following code to your /etc/profile:
# Custom PATH and LD_LIBRARY additions
for source_file in $xdg_source_list
Â Â Â Â Â Â Â source $source_file
Now you can just export all the necessary additions through the files in /etc/environment.imports:
This way it’s extremely easy to maintain a large number of custom-prefixed software for a complete system without touching the user’s custom profile.
Lately Qyoto won’t build because of a rather minor issue in the code. Basically it references itself in kdebindings/csharp/qyoto/src/SmokeInvocation.cs on line 20, so be sure to comment this line if you want the build to succeed.
Without any doubt twhirl is the greatest twitter client available. It’s an Air-based application – meaning you can even use it on Linux.
Now, as you may know KDE 4.1 comes with a handy little twitter client plasmoid itself but the functionality is really limited, the plasmoid is a little buggy and overall can’t compete with twhirl. So, let’s install twhirl then, eh?
First thing you have to do is installing the Adobe Air for Linux alpha. Since the installation is pretty straightforward and the package is an RPM I’ll skip the details.
After installing Air just navigate to the twirl website, look for the “manual installation” paragraph on the right handside and click “Download and install the latest twhirl release”. The installation will start and you’ll be able to start the application afterwards by executing (if you installed it to /opt) /opt/twhirl/twhirl.
You probably want to get rid of the pesky taskbar entry now: With KWin all you’ve to do is press ALT+F3, select Configure Window Behaviour and choose “Window Specific” in the dialog. Create a new rule by clicking New, click “Detect Window Properties” and select the twirl window. Just accept the settings in the upcoming dialog, and close it. Time to edit the rules a bit: Double click the new rule in the list, go to the Preferences tab and select “Keep below”, “Skip taskbar”, select “Force” for each item and don’t forget to enable the checkbox at the end. Apply the settings and voila – a nice, widget-like twirl on your Linux desktop.
The nice thing about twhirl is that it comes with different color schemes and the “Black Magic” colorset matches the dark Oxygen plasma theme almost perfectly.
Yeah, this post is pretty sketchy, I wish I could upload media to illustrate it – but that functionality is still broken.