April 13th, 2013
Trying to generate Murmur.php for the server component of Mumble (named Murmur (which is the only place I’ve ever encountered Ice)), slice2php gave the error:
/usr/share/slice/Murmur.ice:9: error: Can't open include file "Ice/SliceChecksumDict.ice"
#include
1 error in preprocessor.
To fix this I had to run slice2php with a -I statement, to tell it where to find the SliceChecksumDict file (which you can locate using locate or find or the packages search):
slice2php -I/usr/share/Ice-3.4.2/slice /usr/share/slice/Murmur.ice
Tags: ice, mumble, murmur, slice2php, Ubuntu
Posted in Hacks, Linux | No Comments »
April 5th, 2013
I have no idea why this happens. I have not been able to fix the underlying issue, but .. do you have photoshop open?
It turns out photoshop interrupts the alt+number keys globally, so even if you have putty open, changing windows with alt+<number key> won’t work. Closing photoshop makes everything work again.
Weird.
Tags: irssi, putty, Windows
Posted in Hacks, Windows | No Comments »
March 31st, 2013
A small hack to do natural, numeric sort of string values in Python is to use the int function when calling sorted (here, applied to a dictionary get it sorted by its keys):
-
for position in sorted(positions.keys(), key=int):
This will call int() for each value in the list to sorted, and use the numeric value instead of the asciivalue (if the keys / elements are strings instead of numbers).
Tags: Python, python3, sorted
Posted in Hacks, Python | No Comments »
November 12th, 2012
I added the Norwegian translation of the error message to the title as well to help any Norwegians trying to find a solution to this Windows AD issue. The root cause is that the kerberos secret on the client no longer (for some reason) matches the secret stored in the AD forest. The usual fix is to make the client rejoin the domain, however, there’s a better solution.
First you’ll need Administrator access to the client. If you’re unable to log in as an Administrator (because the computer was locked by a domain user account before the secret got borked), reboot the client without any network access. This will allow the user to log in with the cached credentials, as the client is unable to discover that its secret differs from the secret stored in the domain.
You’ll need to download the Remote Server Administration Tools for Windows 7, and install it on the client. After installing, go to Programs and features in the Control Panel, select enable / disable windows features on the left pane, and navigate through:
Remote Server Administration Tools > Role Administration Tools > AD DS and AD LDS Tools
.. and find the choice that includes “console tools” (I don’t remember the exact name).
Start cmd as an administrator (right click, select run as administrator under Accessories), and use netdom.exe to sort the issue out properly.
netdom resetpwd /s:<server.domain.local> /ud:DOMAIN\user /pd:*
The user referenced by DOMAIN\user needs to have access to add / edit clients in the domain.
Tags: Active Directory, failed, primary domain, Windows, workstation
Posted in Hacks, Windows | No Comments »
November 9th, 2012
If your svn client suddenly starts complaining about something similar to
svn: OPTIONS of '...': SSL handshake failed: SSL error: A TLS warning alert has been received. (...)
The reason might be that the host in the URL (https://example.com/ => example.com) doesn’t match the ServerName setting in the SSL host for your web server. You might not have configured this, so for Apache add:
ServerName example.com
.. and restart the server. It might just work again!
Tags: Apache, subversion, svn, tls
Posted in Apache, Hacks | 2 Comments »
April 18th, 2012
After experimenting with deck.js yesterday for two presentations I had to give at a local networking meet, I decided to try to hack together a small extension for deck.js that makes any presentation an Ignite presentation. The concept is simply: 20 slides, 15 seconds for each slide – allowing you to only present the absolute minimum about a subject.
Using the extension is easy; simply download deck.ignite.js from my github repository and add a script tag that references the file after you’ve loaded the usual deck.js files (together with your other extensions):
-
<script type="text/javascript" src="deck.js/extensions/ignite/deck.ignite.js"></script>
You can also configure the delay used for each slide (Pecha Kucha presentations use 20 seconds) by setting the igniteDelay option when initializing deck:
-
$.deck(".slide", { igniteDelay: 20 });
You can read a more detailed description at the github project page.
Tags: deck.js, ignite, ignite presentations, pecha kucha, presentations
Posted in Conferences, deck.js, Hacks, Writing | No Comments »
January 5th, 2012
While building gearman on our older RHEL4 servers, there was two issues that surfaced:
- The version of boost included in RHEL4 is too old (1.32) for gearman. I decided to download the new boost version (1.48.0 at the time of writing) and install it. Be sure to remove the old version with rpm -e boost-devel, so that you don’t get strange conflicts while attempting to build the benchmark tools:
benchmark/blobslap_worker.cc:89: undefined reference to
`boost::program_options::options_description::m_default_line_length'
benchmark/benchmark_blobslap_worker-blobslap_worker.o(.text+0x1d9):
benchmark/blobslap_worker.cc:89: undefined reference to
`boost::program_options::options_description::m_default_line_length'
-
Issues while trying to build the tests/ directory:
tests/stress_worker.cc: In function `test_return_t worker_ramp_TEST(void*)':
tests/stress_worker.cc:113: error: `pthread_timedjoin_np' was not declared in this scope
tests/stress_worker.cc:113: warning: unused variable 'pthread_timedjoin_np'
make: *** [tests/stress_worker.o] Error 1
This can be solved by removing the whole section enclosed in the #ifdef _GNU_SOURCE
section. Let the content in the #else-part in place. Removing this will not affect the usual (and any important parts of it) gearman distribution in any way.
The configure / make process of gearman needs a way to exclude the benchmark/ and tests/ parts of the project from being built.
Tags: Gearman, gearmand, redhat, redhat enterprise linux, rhel, rhel4
Posted in Gearman, Hacks, RedHat | No Comments »
November 21st, 2011
A thread at /r/linux sought out to reveal all the magic ways of increasing productivity under Linux (or other *nix based OS-es), and as most people I thought that there wouldn’t be much news here.
But I was wrong. So very, very wrong.
- disown – a way to disown a process, making it continue running in the background if you have to log out or close a long running session over ssh because you’re going somewhere, but want to keep the currently running process still running. If you’ve ever thought “why the fsck didn’t I run this under screen?”, then this trick is for you. This is a new future, and I’m proud to be a part of it.
- CTRL+r in bash – allows you to search your bash history buffer. I’ve known about this, I’ve just never picked up the habit of actually using it. Will do that now.
- ssh-copy-id – Appends your public key to the authorized_keys file at the destination computer.
- man ascii – the manual page entry for ascii contains an ascii table, right there in your terminal.
- xargs ‐‐max-procs and parallel – allows you to duplicate the functionality of xargs, but in parallel. Starts up all the processes at the same time, instead of starting them one by one.
Head over to the thread for other goodies such as a sudo alias for writing files when you’ve opened them without the correct permissions directly in vim.
Tags: bash, cli, command, Hacks, hints, linux, tips, tricks
Posted in Hacks, Linux | No Comments »
November 3rd, 2011
After upgrading to OpenX 2.8.7 from 2.4.1 our statistics suddenly seemed to have vanished. Debugging an issue like this isn’t just straight forward, but after digging through google searches, wiki pages at OpenX and, well, reading the source (brrrrrrrrr), I think I’ve nailed it.
After upgrading to 2.8.7 the DeliveryLog plugin didn’t get installed – which meant that no delivery / clicks / impressions were logged. After discovering that this had been moved to a plugin I tried simply unzippping the plugin and copying the files to the plugins/-directory. This seemed to make OpenX recognize the plugin if I went to “groups” in the plugin menu, but not under the “plugin” menu. Another problem was the fact that it didn’t actually log anything, which could be considered a problem.
All the Google searches had shown that OpenX had changed the logging format to a new table structure (named buckets), but they don’t provide of restoring / creating the bucket tables if they don’t exist, and they don’t give any error about the bucket tables missing if the plugin doesn’t load. I couldn’t find anything at all about how the tables should look and which tables should be installed, but I finally tried to simply install the plugin through the web interface (Log in as Administrator -> Select Plugins in the top menu) by uploading the zip file directly, and then FINALLY the post install script ran. That created the tables (I’ll dump the definitions later if someone needs them), and after reloading the ads the bucket tables started getting values.
Now we’ll just have to hope that they actually gets aggregated into something useful as well..
PS: I’m less than impressed by the OpenX upgrade procedure, it always seem to fsck up some detail that leaves your installation in limbo, without being able to detect that something has gone wrong and provide a way to resolve the issue. I understand that they need to – and want to – focus on their pay product, so well, I’ll keep having to fix things manually for a while, but Google’s Doubleclick for Small Businesses may see a new customer soon.
Tags: buckets, Hacks, OpenX
Posted in Hacks, OpenX | No Comments »
October 24th, 2011
Some time after upgrading to Ubuntu 11.10 I ended up with the dreaded “Unable to retrieve message” in Evolution (which I use for Exchange connectivity). This has usually corrected itself by simply restarting Evolution, but this time nothing would help. I stumbled across a thread that provided a few ways to possibly solve the issue, but the .evolution directory didn’t contain any live installation in Ubuntu.
Turns out the directory is:
.local/share/evolution
As both my mailstore and address book lives on the Exchange server, I decided to just move the evolution directory to a new name and recreate the evolution directory from scratch. This takes a bit of time while Evolution indexes everything, but after a while everything were back to normal.
Tags: errors, evolution, exchange, linux, Ubuntu
Posted in Hacks, Linux, Ubuntu | No Comments »