Archives 2005 - 2019

How to change the default sort order in Kate (KDE) file dialogs

published May 09, 2013 04:40   by admin ( last modified May 09, 2013 04:36 )

On Ubuntu 13.04 (at least), edit the file:

~/.kde/share/config/kdeglobals

It is a configuration file in the Windows INI style format. Locate the section called

[KFileDialog Settings]

Change the settings:

Sort by=Date
Sort reversed=true

into:

Sort by=Name
Sort reversed=false

Furthermore, changing

View Style=Simple

into

View Style=Detail

will make it easy to change the sort order on the fly.

The changes will not be immediately picked up by Kate. I did not need to restart the computer or even logout from my Ubuntu Unity session, but logout is probably the way to go if the changes do not take effect after a while.


Plone training in London July 2-4

published May 07, 2013 07:23   by admin ( last modified May 07, 2013 07:23 )

We will be back with Plone Training, with a three day course July 2 -4 2013 in London.


Using bottle.py as a Facebook authenticating proxy

published May 02, 2013 06:30   by admin ( last modified May 02, 2013 06:29 )

I haven't actually tested this, so far just assembling bits and pieces that ought to work together.

 

How to make bottle.py into a proxy server:

Making a Bottle app that routes to a proxy

How to make bottle.py authenticate via Facebook:

sean-lynch/bottle_fbauth · GitHub

Underlying python library for the Facebook authentication:

facebook-sdk 0.4.0 : Python Package Index


Text editor for LXDE

published Apr 30, 2013 03:15   by admin ( last modified Apr 30, 2013 03:15 )

Now trying Geany, will see how it performs.

 

I recommend geany, which does not depend on Gnome and seems to have almost everything I might want.


Read more: Link - Developer list for the LXDE desktop environment ()


Lubuntu 13.04 not as dependency-happy as it first seems

published Apr 26, 2013 06:05   by admin ( last modified Apr 27, 2013 02:16 )

I installed the LXDE lightweight X11 desktop environment  on a Debian-based virtual machine (Bachata Linux) and I liked the simplicity of it. So I decided to try lubuntu, Ubuntu with LXDE, on a virtual machine. Once installed, I tried to remove one of the games, to clear up the menus a bit. However then it seemed like it wanted to uninstall LXDE proper..

I wonder if it actually meant a meta-package or what it's called, seems strange to have an all-or-nothing install. I investigated further:

 

All is well then, somebody else must have thought the same thing as I, and added the explanation. It is apparently safe to remove lubuntu-desktop without removing the, eh, Lubuntu desktop.


Page output from inside the python shell (REPL)

published Apr 25, 2013 10:16   by admin ( last modified Apr 25, 2013 10:16 )
import pydoc
pydoc.pager('\n'.join('Hello World %d!' % x for x in xrange(200)))



I had no idea about this. It works well with pythn 2.7 on Ubuntu 12.04

 


Read more: Link - mitsuhiko comments on how to print output like "less" in shell?


Hartmann - Pipelines with multiple ins and outs

published Apr 24, 2013 11:14   by admin ( last modified Apr 24, 2013 11:14 )

Sometimes I think it would be useful to have pipelines where you can branch out and handle errors or other conditions, or jump forward in a pipeline. There seems to be one syntax that covers this, the Hartmann pipeline:

 

Hartmann pipeline - Wikipedia, the free encyclopedia


Block computers from seeing each other on a wireless network

published Apr 20, 2013 01:40   by admin ( last modified Apr 20, 2013 01:40 )

It's called "wireless isolation", "AP isolation, "client isolation", "Publicly Secure Packet Forwarding" or "Wireless Client Security Separator" and I reckon and hope that it is implemented in most public and semi public Wi-Fi  networks.

Earlier this week as part of a python programming course, I demoed  service discovery applications for both Daap and Dlna servers. I wondered if I'd pick up any such devices from the massive guest Wi-Fi network I was on. I picked up none and realized that this was probably because the network did not allow devices to communicate between themselves, only out through the gateway to the Internet. That is good.

But what is that feature called? It seems to have different names and no agreed-upon standard terminology, but one term used is "wireless isolation", another is "Wireless Client Security Separator". I suppose that is a really good feature to have switched on, on a public or semi public network. On Netgear devices it's called "Wireless Client Security Separator".

Read more:


Styr en radiomottagare i Holland

published Apr 08, 2013 02:37   by admin ( last modified Apr 08, 2013 02:37 )

Hur kopplar man en radio till en dator? Måste man bestämma vilken kanal man ska lyssna på osv? Nej, digitalisera alltihopa och skicka hela spektrumet över gigabit Ethernet till datorn.

Och så kan datorn avkoda den frekvens man vill lyssna på, och bandbredd, och modulationsteknik (AM, FM), och med AM single side band osv. 
 
Och förresten, varför inte låta flera göra det på samma gång, så att man använder samma dator för att lyssna på olika frekvensband och modulationer samtidigt, typ just nu 100stycken användare på en radio?
 
Och så kan man göra en front end i Java, eller varför inte också i Javascript.
 
Och så gör man det från Holland. Kul för hela familjen:
 
 
(rulla nedåt för att hitta radiokontrollerna)
SDR board (pictured above; see here for background) which samples the entire shortwave spectrum and sends all of this via a gigabit ethernet link to a PC

Read more: Link - Wide-band WebSDR in JO32KF


Getting a missing wireless card back on Dell 1015, Ubuntu 12.04 (and a bit of 11.10)

published Apr 05, 2013 07:40   by admin ( last modified Apr 25, 2013 10:19 )

Summary: Still having problems, also with external USB WiFi card. Now upgrading to 13.04 to see if that helps.  Keeping the rest of the text here for reference.

The problem seem to have disappeared now after I installed a new kernel, version 3.5 from a repository of more experimental kernels. Additionally, it seems I had misunderstood the update policy of menu.lst, the settings file that controls what options for kernels you have. I had basically been running Ubuntu 12.04  with a 3.0.0-17 kernel for Ubuntu 11.10.

I now have an updated menu.lst and will test later to see if 3.2 and 3.4 kernels work with the wireless too. If you have problems with wireless it may pay off to try a couple of different kernels, in the case the one you are running has buggy support or incompatibilities.

The experimenatl kernel repository:

sudo apt-add-repository ppa:kernel-ppa/ppa
sudo apt-get update

Suddenly wireless Ethernet disappeared from my Dell 1015 which is running Ubuntu 12.04. It was a bit of a surprise since it had worked before, on the same Ubuntu 12.04 for months. When I say it disappeared it was just like the computer did not have the wireless card anymore, although the dual-booted Windows had no problems using it. Furthermore, adding a USB stick with Wi-Fi just brought back the networks in the menus. You could connect but not send or receive any data.


Diazo rules for Plone

published Mar 31, 2013 01:39   by admin ( last modified Mar 31, 2013 01:39 )



Here is a list of rules that I have used in various situations when preparing a Diazo theme for Plone.


Read more: Link - Flight of the Pigeon: Common Diazo Rules for Plone


Replacing the white with transparent in the gimp

published Mar 30, 2013 05:10   by admin ( last modified Mar 30, 2013 05:18 )

I had to adjust the look of a navigation arrow, that had been anti aliased against a white background, but now the arrow should function as a semi transparent overlay on a slideshow. So I needed the Gimp to not only convert pure white to transparent, but somehow understand that white should in general mean "transparent" so that areas fading to white should in fact be fading to transparent. It did  not matter if the whole image got a bit semi transparent due to this.

Old version, you can see the anti-aliasing to white, giving a halo to the image as it is being laid over a slide

 

 

New version, the whole arrow became semi-transparent, but that is ok for this purpose. Note that the pesky halo is completely gone

 

 

Turned out to be really simple: Select Colors->Colors to Alpha in the menus and go with the default white.



 

The canonical way is to use Color/Color to alpha and give the background color, but that doesn't work too well with white because it makes a lot of things semi-transparent.


Read more: Link - Changing a white background to transparent (.png)


Narkolepsin och hajoljan?

published Mar 26, 2013 04:25   by admin ( last modified Mar 27, 2013 12:05 )

Nu har läkemedelsverket kommit fram till att de unga som vaccinerats mot svinfluensa i Sverige har drabbats av narkolepsi i mycket större utsträckning än de som inte vaccinerats (SvD).

– Vi kan se att över studieperioden har vi 126 fall av de vaccinerade som har fått narkolepsi. Bland ovaccinerade har vi 20 fall.

Det verkar som att det just är vaccinet som heter Pandemrix som pekas ut, och det är om jag minns rätt ett vaccin som inte så har mycket virus i sig, vilket man försökt kompensera genom att ha en adjuvant i. En adjuvant är en substans som allmänt retar immunförsvaret, och det låter som en dålig idé tycker jag, det där med att stimulera immunförsvaret extra, när vi vet att många av våra allvarliga sjukdomar har autoimmuna komponenter. Adjuvanten i det här fallet tror jag är hajolja.

Det finns alltid en fara att behandla  med mediciner som inte är ordentligt testade. Och det är minsann inte lätt att grundligt testa något, speciellt om konsekvenserna blir synliga många år senare. Den libanesisk-amerikanske skribenten Nassim Nicholas Taleb har skrivit en hel del om detta, det kallas iatrogenics på engelska (wikipedia-artikel på engelska här). Neurosedyn-fallen är en av de mer kända exemplen. 

Talebs regel är att man inte ska behandla mildare åkommor alls med medicin, då risken för bieffekter ofta av naturliga skäl är okänd (de flesta läkemedel är inte rigoröst testade i 50 år, eller för effekter över generationer). Vi vet dock att naturen är något människan i stort kan hantera (med åtgärder för sanitet i alla fall). Däremot ska man behandla aggressivt vid svåra eller ovanliga sjukdomsfall, enligt Taleb.

 

Trots narkolepsin försvarar Ingemar Persson massvaccineringen. – När vi stod i den situationen fanns ett ansvar att ta ett beslut att skydda befolkningen. Narkolepsi-problemet kom som en total överraskning och eftersom det är en så ovanlig sjukdom var det heller inget vi hade kunnat ta reda på innan.

Vaccin mot olika åkommor har ju funnits länge. Frågan är hur mycket data som finns på adjuvanter, och specifikt den adjuvant som finns i Pandemrix?

Jag skrev om detta också i februari 2012: Adjuvanten skurken bakom narkolepsi efter vaccinering mot svininfluensa?


An explanation of monads that is actually easy to understand

published Mar 21, 2013 08:49   by admin ( last modified Mar 21, 2013 08:49 )
A while ago I gave a talk at jsconf.eu about functional programming. I wasn't happy with the explanation I gave on monads. Since I feel I can do better than that, I'm going to add my blog post to the hundreds of posts already floating around on the subject, hoping that it will help some people to see things more clearly

 

Read more: Link - Jabberwocky


Trello - some kind of flexible brainstorm and project management

published Mar 18, 2013 04:35   by admin ( last modified Mar 18, 2013 04:32 )

Using cards as metaphor. Looks really interesting!

 

Your entire project, in a single glance.


Read more: Link - | Trello


Facebook integration for Plone

published Mar 14, 2013 06:19   by admin ( last modified Mar 14, 2013 06:19 )

Found a stackoverflow question on this

 

I'm searching for an existing Plone add-on that allows Facebook users to authenticate in Plone - version 4.x.


Read more: Link - How to authenticate with facebook account in Plone - Stack Overflow

 

A couple of solutions are proposed (currently untested by me):

 

domruf / plonesocial.auth.rpx — Bitbucket - Plone 4 friendly fork of plonesocial.auth.rpx .

codesyntax/cs.auth.facebook · GitHub - Code from Aspeli's book

collective.facebook.accounts 1.0b2 : Python Package Index - a third option

 

all untested by me


Clojure stuff

published Mar 13, 2013 03:55   by admin ( last modified Apr 26, 2013 05:27 )

 The Clojure Toolbox

"The Clojure Toolbox  A categorised directory of libraries and tools for Clojure"

ClojureDocs - Community-Powered Clojure Documentation and Examples

"ClojureDocs is a community-powered documentation and examples repository for the Clojure programming language"

Clojure libraries for MongoDB, Riak, RabbitMQ, validations, Neo4J, ElasticSearch, Memcached, Apache Cassandra, Kestrel and more

"A growing collection of open source Clojure libraries that support multiple Clojure & JDK versions, licensed under the EPL, target Clojure 1.3+"

 schani/clojurec · GitHub

"ClojureC This is compiler for the Clojure programming language that targets C as a backend."
 

 Immutant | Home

"Immutant is an application server for Clojure. It's an integrated platform built on JBoss AS7 providing support for Ring handlers, asynchronous messaging, caching, scheduled jobs, XA transactions, clustering, daemons and more!"

ibdknox/fetch · GitHub

fetch "A ClojureScript library that makes client/server interaction painless".
 

 alexander-yakushev/lein-droid · GitHub

"lein-droid A Leiningen plugin to simplify Clojure development for Android platform" (still not easy as far as I understand)

dfuenzalida/todo-cljs · GitHub

"A port of the JavaScript TODOs app to ClojureScript, copied from http://todomvc.com/vanilla-examples/vanillajs/"

Edn - sonds like JSON for Clojure:edn-format/edn · GitHub

Routing in Compojure: clojure - What's the "big idea" behind compojure routes? - Stack Overflow

A sample clojure web application, how to deploy it to heroku and a demo on heroku of the application: Building a Database-Backed Clojure Web Application | Heroku Dev Center

Clojure web server benchmarks: ptaoussanis/clojure-web-server-benchmarks · GitHub

I think the nginx performance is just there for reference, it does not serve out clojure stuff, at least not from what I can see in the nginx configuration file. On the other hand, it is bested in the benchmarks by http-kit (http-kit/http-kit · GitHub), which seems to serve out clojure stuff:
 

 Home | http-kit, high performance HTTP Client/Server for Clojure

"HTTP Kit is a small, efficient, Ring-compatible HTTP client/server for Clojure. It uses a event-driven architecture to support highly concurrent a/synchronous web applications (including WebSocket applications)."

Pedestal - A web framework

Clojure seem slower than Java: Clojure speed ÷ Java 7 speed | Computer Language Benchmarks Game

Clojurescript One:

ClojureScript One will show you how ClojureScript reduces the complexity of web development

Read more: Link - ClojureScript One Guide

Planet Clojure
 

rplevy/swiss-arrows · GitHub

"swiss-arrows A collection of arrow macros." The thread macro, but with placeholders and a bit of branching.

 

Clojure Concurrency A tour of concurrency primitives in Clojure


Read more: Link - Clojure Concurrency - Online Training Course for .NET Developers

 
 

Military belts and how to find out the name of the buckle part

published Mar 07, 2013 10:31   by admin ( last modified Mar 07, 2013 10:31 )

I have a leather belt for casual dress use, with a military style belt buckle. It locks the belt by friction. I really like it and would like a couple of more belts like it in other belt colors, but could not find it on the Internet. I had no problems finding ones with the correct kind of buckle but where the belt wasn't leather.

Until I realized that you need to know the exact term to describe that kind of buckle. At Baron Belts I found the term "slip-through with friction pin", but that did not help much, since that term did not seem to be in common use to describe the finished product. Wikipedia to the rescue: On their page on belt buckles one can find the term "Box-frame buckle". And that is what one has to search for: Box-frame buckle. And there are some very nice leather belts indeed.


How to make a select element into a list of links that you can jump to

published Feb 18, 2013 02:51   by admin ( last modified Feb 18, 2013 02:51 )

It was suprisingly hard to search for this on the Internet. Summary: It's the select element that gets the onChange event, and from there you can get  hold of the index of the selected option.

 

Creating a combo menu that jumps to a URL upon selecting


Read more: Link - Creating a combo menu that jumps to a URL upon selecting


A javascript for sorting and filtering tables

published Feb 13, 2013 03:24   by admin ( last modified Feb 13, 2013 03:24 )


I found a six year old javascript that does sorting and filtering of HTML tables rather nicely. Works well in intial tests in Firefox and Chrome on Ubuntu.
 

Click on column headers to sort by the column. Sorting is done within the two tbody sections, not across them, and the header and footer are not changed. The table is auto-striped and auto-sorted on the first column on page load


Read more: Link - Table Sorting, Filtering, Etc from JavascriptToolbox.com