-
How to make sure that your webserver isn’t blocket by the ISP?
First of all, if it says in your contract that you can’t run servers, doing so may result in your connection being cut, so do this on your own risk! Second of all, I don’t advocate running websites on a home machine. Get a VPS! All this said, if you do run a webserver on…
-
Installing guest additions for VirtualBox with Ubuntu 8.10
I installed VirtualBox (the OSS version) from the Ubuntu repos (in hindsight it may have been better to use the VB repos, but I’m just lazy), and when I tried to install the guest additions in a WinXP VM, it complained that it can’t find the VBoxGuestAdditions.iso. The solution: Download the corresponding iso from here…
-
Changing the NTP server under Windows
Disclaimer: I’m not a Sysadmin and I’m especially not a Windows/Active Directory sysadmin. From what I’ve know, there is some overlap between this and the AD stuff (in the sense that the DC also provides time info AFAIK, so please also check that possibility if it applies). As always, feedback is welcome. Setting up NTP…
-
Solving the “DLL failed to initialize” problem with Wine
Recently Wine was refusing to start any Windows program. When I dropped down to a (gnome-)terminal and tried to launch executables the “manual” way (by typing wine [executable name]), an error message similar to this was presented: fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION err:module:LdrInitializeThunk “RPCRT4.dll” failed to initialize, aborting err:module:LdrInitializeThunk Main exe initialization for L”…” failed, status c0000005…
-
Efficient SQL pagination method
The usual technique for displaying data from an SQL query as multiple web-pages involves the LIMIT/OFFSET clause. For example for the first page the query would look like something like: SELECT foo, bar, baz FROM ozz WHERE … ORDER BY … OFFSET 0 LIMIT 10 For the second page you would do: SELECT foo, bar,…
-
Finding unused indexes in PostgreSQL
First some quick DB/index design tips: When you have a 1-1 relationship, you might consider putting the data in one table, instead of several tables and linking them with foreign keys. This will speed up data retrieval considerably. This needs to be balanced with the number of cases when the given values are missing /…
-
Viewing colored output with less
When an output is filtered through less, the colored characters are transformed to black and white (or whatever your terminal settings are). This is because less, by default, strips away (filters out) escape sequences. These are special sequences which tell the terminal to do something special (like move the cursor, change the color and so…
-
Reboot Windows – the hard way
I was clicking around via an RDP session on a Windows server and managed to kill the LSASS process (note to myself: next time pause the view of ProcessExplorer before killing processes!). The one minute till reboot screen promptly appeared and my first reflex was to stop the countdown (this is a trick which came…
-
Finding a Windows computer based on its NetBios name
A short tip: when working in hybrid environments (that is where both Windows and Linux machines are present), it is useful to be able to lookup a machine IP based on its NetBios name. You can do this by writing nmblookup [the name of the computer]. This will do a broadcast on all the interfaces…
-
Offline updating of Debian systems
It has been my experience that a Linux system is much more usable if it’s connected to the Internet, because then the package management system can be used to resolve the dependencies of the programs. From what I’ve seen (and please bear in mind that I’m fairly new to it), in Linux it is much…