Fully enabling HTTPS on WordPress

Posted in Uncategorized by admin - Nov 16, 2011

If you want to get WordPress to support HTTPS without any unencrypted content being transferred to the client and included from the browser, you have to force WordPress to change the siteUrl depening on the request schema which comes from the client.
The basis for my small addition below is this post: https://prosauce.org/blog/2010/08/enable-complete-support-for-ssl-on-wordpress/
It explains how to do the changes described briefly above.

What’s still left is that for whatever reason, WP doesn’t make the pingback URL relative to the site_url we did set with the trick in the post, so we have to change that little line to in wp-includes/general-template.php to the following.

case 'pingback_url':
$output = /*get_option('siteurl') */ site_url().'/xmlrpc.php';
break;

Tags: COMMENTS

Gnuplottex – rotate y-axis label with LaTeX

Posted in LaTeX by Julian Kessel - Aug 31, 2011

A known caveat of the latex gnuplot terminal is the missing functionality to rotate text, which especially hurts for the ylabel.

Here's one dirty way to workaround this:

set ylabel "\\begin{sideways}YAXIS [$ms$]\\end{sideways}"
Tags: COMMENTS

This time I was writing a gnuplot script for embedding the graphic in a latex document, with the help of gnuplottex package, no problem I thought.

But unfortunately my script names an axis like 

set xlabel "Temperatur an $R_1$ [$^{\degree}C$]"

You'll notice that degree is displayed as a string and not executed to produce" as intended.

You have to escape the backslash so it will not be processed by gnuplot but rather by latex, success :)

set xlabel "Temperatur an $R_1$ [$^{\\degree}C$]";

A second failure I made writing log(1/3), while gnuplot, like C does, implicitly uses integer operations for an expression without a fp value, this leads to a silent error. (gnuplot skips dat file with no valid points)

For the protocol:

f(r) = (((log(1.0/3.0)*r*(47e-6))*-1)*1000)

is the right way to do it

Tags: COMMENTS

I'll keep it short: Export your AB via evolution, import it into TB, export it as csv, run the following script:

awk -F"," '{printf("%s,%s,%s %s,", $1,$2,$1,$2); for(i=4;i<36;i++) printf("%s,",$i); printf("\n")}' in.csv > out.csv

import the new csv into TB. You can also shorten this way via modding my one-liner and directly transforming evolution's output (it just makes double qoutes around the values) and import it then.

Tags: COMMENTS

I has been a rather long time searching for a decent plotter application for linux. Though as a gnome user I usually defer kde apps because of their deps, but this time I found no alternative available which provided all stuff kmplot features.

Besides all cool features which can be discovered by clicking around in the UI, kmplot learnt me to split a parameterized function like x³-2tx² in two functions which describe the x-axis and y-axis seperately and controlling the values of t with a slider.

First, you have to get used to the fact that we call out functions f_x and f_y now, and not f as usual actually meaning f_y. That's because you just require f_x (the function generating x-values) to be e.g. f_x(x) = x (linear slope @1).

The function f(x)= x³-2tx² splits up in f_x(x) = x and f_y(t,k)=t³-2kt² while k is the parameter controlled by the slider (check "slider" and choose one from the list).

While this makes sense for being able to modify f_x later It's also possible to choose a regular cartesian plot.

Tags: COMMENTS

While testing several states (gpt,mbr,formatted,unformatted) I ran over a couple of weird errors including 1429 and a message that complained about that other programs would hold a write lock on the fs.

The final solution was the option in Vbox to turn on the USB 2.0 EHCI controller which needs the extension pack installed. On Archlinux you get it in the AUR, but you have to register it in the vbox prefs since the install script doesn’t handle this.
Instead, you can dl the extension a second time from the site, open in w/ vbox. It will register the previously installed one and give you an error because of conflicting files which is ok. After this, you can enable the EHCI controller and restoring/syncing will work fine :)

Tags: COMMENTS

Working with terminal controlcodes

Posted in Uncategorized by Julian Kessel - Aug 03, 2011

I wondered about how to clear a line in a shellscript which uses \r to do a carriage return and reuse the same line to output some text:

While the CR does not clear the contents of the line, you have to do that yourself:

  echo -ne "\033[2K\r"`echo $i | awk '{$1=""; print $0}'`

I use that line to display a string in a loop as described above. The \033 is nothing else than the escaped octal notation of \e which is ESC.

You can find a lot more related info to at http://www.termsys.demon.co.uk/vtansi.htm

Tags: COMMENTS

Using pithos with ssh and without socks

Posted in Uncategorized by Julian Kessel - Aug 01, 2011

Pithos is a native pandora client for linux which uses the pianobar library.

Users with their endpoint outside of the US have the common problems using pandora with tunnels and so on.

If you have a ssh connection to somewhere in a allowed country and being allowed to create port forwardings, this is for you:

Since pithos doesn't allow socks proxys yet you can do an admittedly bad, but working workaround:

get the pandora hosts:

host pandora.com

pandora.com has address 208.85.40.20
pandora.com has address 208.85.40.50
pandora.com has address 208.85.40.80

setup your ssh connection:

ssh user@server -L 8000:208.85.40.50:80

This will tunnel all traffic from localhost:8000 via your server to one pandora server on port 80, you can use another ipaddr if you want.

Now you have to enter http://localhost:8000 in the proxy field of pithos.

That's it :)

Tags: COMMENTS

reboot-safe cfg of thinkpad HIDs

Posted in Uncategorized by Julian Kessel - Jun 02, 2011

I used to configure my trackpoint and touchpad w/ gpointing-device-settings, this way cfgs are non-persistent. I achieved persistency through the following method:

prepend the following to the launch of the wm in ~/.xsession

xinput set-prop 'TPPS/2 IBM TrackPoint' "Evdev Wheel Emulation" 1
xinput set-prop 'TPPS/2 IBM TrackPoint' "Evdev Wheel Emulation Button" 2
xinput set-prop 'TPPS/2 IBM TrackPoint' "Evdev Wheel Emulation Timeout" 200
xinput set-prop 'SynPS/2 Synaptics TouchPad' "Synaptics Palm Detection" 1
xinput set-prop 'SynPS/2 Synaptics TouchPad' "Synaptics Off" 2
xinput set-prop 'TPPS/2 IBM TrackPoint' "Evdev Wheel Emulation Axes" 6 7 4 5

Tags: COMMENTS

Show dd ‘s progress on OSX

Posted in Uncategorized by Julian Kessel - Feb 06, 2011

Simply using kill -USR1 or -USR2 on dd's process id while copying bytes around doesn't work on OSX. You have to use -SIGINFO or -s SIGINFO to achieve that result. Unfortunately trying the first two signals kills the process completely so you have to start from the beginning.

Tags: COMMENTS