Archives 2005 - 2019    Search

Länk - Färganpassning av skärmen till dygnet

published Jan 08, 2012 10:41   by admin ( last modified Jan 08, 2012 10:41 )

 

f.lux makes your computer screen look like the room you're in, all the time. When the sun sets, it makes your computer look like your indoor lights. In the morning, it makes things look like sunlight again.



Read more: F.lux: software to make your life better


Bör man ha åsikter om läkemedelsförpackningars storlek och utformning?

published Jan 04, 2012 05:26   by admin ( last modified Jan 04, 2012 05:26 )

Speciellt receptfria. En Facebookdiskussion spårade in på denna fråga. Jag lägger upp denna post om vidare diskussion önskas.

 

Freakonomics » Why Can’t You Buy a Big Bottle of Headache Pills in England?


Piano player on getting better

published Jan 02, 2012 10:37   by admin ( last modified Jan 02, 2012 10:37 )

This is supposed to applicable to programming, not sure but I make a bookmark:

 

  • Strategy #1: Avoid Flow. Do What Does Not Come Easy.
  • Strategy #2: To Master a Skill, Master Something Harder.
  • Strategy #3: Systematically Eliminate Weakness.
  • Strategy #4: Create Beauty, Don’t Avoid Ugliness.




Avoid Flow. Do What Does Not Come Easy.


Read more: Study Hacks » Blog Archive » Flow is the Opiate of the Mediocore: Advice on Getting Better from an Accomplished Piano Player


How to disable WPS on Netgear WNDR3700

published Dec 30, 2011 04:15   by admin ( last modified Dec 30, 2011 04:15 )

A new attack against home routers has been discovered, and an exploit tool has been made available. To disable WPS  on a Netgear WNDR3700: Go to the admin interface, look at the Screen shot below: go to "Advanced Wireless Settings" and check the checkbox "Disable Router's PIN". Then click the "Apply" button.

 

(I have not verified that WPS is indeed disabled, but as long as the WNDR admin interface does what it says, it should be OK)

Just a day after security researcher Stefan Viehbock released details of a vulnerability in the WiFi Protected Setup (WPS) standard that enables attackers to recover the router PIN, a security firm has published an open-source tool capable of exploiting the vulnerability.



Read more: Attack Tool Released For WPS Setup Flaw - Slashdot

 


Länk - Virtual machines for Internet Explorer testing

published Dec 16, 2011 12:50   by admin ( last modified Dec 16, 2011 12:50 )

 

Microsoft provides virtual machine disk images to facilitate website testing in multiple versions of IE, regardless of the host operating system. Unfortunately, setting these virtual machines up without Microsoft's VirtualPC can be extremely difficult. The ievms scripts aim to facilitate that process using VirtualBox on Linux or OS X. With a single command, you can have IE7, IE8 and IE9 running in separate virtual machines

Default password seems to be Password1

Read more: xdissent/ievms - GitHub


Are there any GUI toolkits for the canvas element in HTML5?

published Dec 15, 2011 12:03   by admin ( last modified Dec 15, 2011 12:03 )

Summary: Amino is the closest that I have found, although it seems to be more targeted towards interactive graphics and animation. Although I suppose a GUI is interactive graphics. Untested by me.

Why are there no GUI toolkits that simply do a away with clunky HTML form elements and instead manipulate the CANVAS element directly?

There are now implementations of VNC (noVNC, see my article here) and gtk that show that you can manipulate the canvas element pixel by pixel with enough speed to  make it a fully fledged GUI.

A desktop user interface is vastly superior to HTML based user interfaces and with pixel-by-pixel control I could do so much better user interfaces for compound data and complex interactions. HTML is awkwardly retrofitted into service of something it was never intended to do.

So my question is, why not forego HTML elements completely and instead make something more like Qt, Gtk, Tk or wxwidgets  in javascript for use directly inside a canvas element. You could even throw in a window manager there.

There is a question about this on Stackowerflow, but it was fielded back in 2009 and there aren't that many good answers posted, though Bespin is mentioned

Are there any GUI toolkits built on top of HTML Canvas like swing,swt,gtk or qt? So that it is possible to build applications like applets or flex gui:s inside the html canvas.


 javascript - Are there any GUI toolkits built on top of HTML Canvas like swing,swt,gtk or qt? - Stack Overflow

A comment on Reddit by Chris McDonough originally set me thinking:

 "Many modern web apps are written largely in JavaScript (or even Objective-C on the iPhone) and the server side is just a glorified pack mule that schleps data to and from a persistence engine. Things change."

Ok, we are moving from generating the GUI server side on the web, to generating it in the user's browser.

 


Small linuxes

published Dec 15, 2011 05:31   by admin ( last modified Dec 15, 2011 05:31 )

I'm evaluating small linuxes, and have found two in the 10MB range: ttylinux and Tiny Core Linux. I have played a bit with tty, and will se what Tiny core can do.

 

Update: I have now tried Tiny Core and it crashed and burned through my VirtualBox and took down the entire laptop. Powerful stuff.

 

ttylinux, a small GNU/Linux system available for several CPU architectures. This small system has an 8 MB file system and runs on i486 computers within 28 MB of RAM, but provides a complete command line environment and is ready for Internet access.



Read more: ttylinux homepage

 

Tiny Core Linux is a very small (10 MB) minimal Linux GUI Desktop. It is based on Linux 2.6 kernel, Busybox, Tiny X, and Fltk. The core runs entirely in ram and boots very quickly. Also offered are Micro Core, a 6 MB image that is the console based engine of Tiny Core, and Multi Core, which includes Tiny Core, Micro Core, networking tools and an installe



Read more: Tiny Core Linux, Micro Core Linux, 10MB Linux GUI Desktop, Live, Frugal, Extendable

 


Mount a VirtualBox VDI file on Ubuntu and Debian

published Dec 13, 2011 02:06   by admin ( last modified Dec 13, 2011 02:06 )

Tested on Ubuntu 10.10.

If one of your virtualbox OS instances is hosed, you may still want to reach the files on it. You can actually mount the vdi file (the virtual disk image) on your Linux, and reach the files inside.

VirtualBox 4.0.x did not work for the following, I installed VirtualBox 4.1.6 .

Download gord-vbox-extras_1.0-4_i386 from here.

This will install vdfuse-v82a on your computer and in your path.

Make sure your user is in the fuse group, and that the line "user_allow_other" is commented in, in the /etc/fuse.conf preferences.

Figure out where the VDI file is that you want to mount. Let's say it is called "myvirtualmachine.vdi".

Make an empty directory to be the mount point of the volume that holds the file systems of your VDI image. Call it e.g. "mountpoint".

Mount the volume with:

vdfuse-v82a -f ~/VirtualBox\ VMs/myvirtualmachine/myvirtualmachine.vdi mountpoint/

 

Make a directory to hold the file system, call it e.g. "file-system".

Mount the file system there:

sudo mount mountpoint/EntireDisk file-system -o loop

This was enough for me, and all files are now visible and editable. I had put the OS directly on the entire disk in th evirtual machine. If there are partitions, maybe there is more mounting to do; I do not know.

You may need to use sudo to add and edit files, if their access restrictions don't match with your user id.

 

 

I have uploaded a new version of gord-vbox-extras to sourceforge. It now has zenity and nautilus and virtualbox-4.0 as formal dependencies. If you run KDE or something else, you can always unpack the package, rather than installing it.



Läs mer: virtualbox.org • View topic - Discuss: Mount any VBox-compatible disk image on the host

 


Make the smallest Debian server for virtual server use

published Dec 11, 2011 11:27   by admin ( last modified Dec 11, 2011 11:27 )

Mikael Ståldal has written a guide of how to make a really small Debian that you can use as a basis for your virtual server.

It still includes networking, bash and most importantly, the Debian package management system. The latter sets it apart from many other small distros, that have their own package management systems. Although the image is still 256 MB, it only consumes 6MB of RAM, which is good for virtual servers, where RAM is one of the more scarce resources.

If one concentrates on virtual servers, it ought to be possible to rebuild and strip the kernel of code that caters for hardware not used. I guess one then needs to analyze what hardware the different virtual environments pretend to provide.

To build a minimal Debian based Linux system with a fully functional bash shell, TCP/IP networking and apt setup to be able to install any package from the Debian repositories. The resulting disk image will be about 256 MB and consume about 6 MB RAM.



Läs mer: How to roll your own Debian based Linux distro | Mikael Ståldal’s technical blog

 


Notes on ttylinux 9.10 for PC

published Dec 11, 2011 07:03   by admin ( last modified Dec 11, 2011 07:03 )

For the small tty Linux 9.10:

  • According to the documentation, root's password is "password". However, it's "root".
  • The install program is listed as being called ttylinux-installer, however it is in fact named installer.

 

There are two initial accounts: root, the administrator account, with password password; user, a user account, with password password

ttylinux User Guide

 


How to get the http (protocol) back in the Firefox url field

published Dec 10, 2011 01:43   by admin ( last modified Dec 10, 2011 01:43 )

Type "about:config" in the url field. Hit return. Type "trim" into the field. Click at the line containing "browser.urlbar.trim" in the search result, to flip it from "true" to "false".

browser.urlbar.trimURLs



Läs mer: GNOME 3 Wins Linux Journal's Readers' Choice Award - Slashdot


Länk - How to find out what variables are defined in buildout

published Dec 06, 2011 01:37   by admin ( last modified Dec 06, 2011 01:37 )

Note to self:

I found from the buildout docs that bin/buildout annotate was what I was looking for.



Läs mer: python - Listing buildout configuration variables - Stack Overflow


How to control what MIME types your browser accepts

published Dec 02, 2011 06:27   by admin ( last modified Dec 02, 2011 06:27 )

I had a hunch that a web development problem had to do with different web elements historically being saved alternately in utf-8 and iso-8859-1. I decided to try tell the web server that my browser only accepted iso-8859-1, to see if I could trigger the bug.

I used the modify headers add-on for Firefox, and in it I specified like so:

I then verified on the server side that the headers were indeed altered.

 

The bug I was trying to find? Turned out not to have to do with this.

Add, modify and filter the HTTP request headers sent to web servers. This addon is particularly useful for Mobile web development, HTTP testing and privacy.



Läs mer: Modify Headers :: Add-ons for Firefox

 


Bootstrap - ett snabbt sätt att tota ihop designen på en sajt

published Nov 28, 2011 05:50   by admin ( last modified Nov 28, 2011 05:50 )

Och någon verkar ha anpassat det till Plone.

Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.



Läs mer: Bootstrap, from Twitter


Livecode - Answer the result

published Nov 28, 2011 02:18   by admin ( last modified Nov 28, 2011 02:18 )


I'm not exactly sure what Livecode is, but I know what it looks like - Hypertalk, the language used in Apple's venerable HyperCard and its ilks (such as SuperCard). I was a professional HyperCard programmer at one time.  I found Livecode while searching for text processing code for Javascript. This brings back memories. I liked Hypertalk.

put word 3 to 6 of “The quick brown fox jumped over the lazy dog.” into theVariable



Läs mer: Text and Data Processing | RunRev


Tracing python code

published Nov 25, 2011 03:05   by admin ( last modified Jun 08, 2015 03:17 )

I have used this to figure out what is happening in complex pieces of software, such as Plone.

The hook is set via the sys.settrace() function. This takes a function which is called during any of several events. One is the "line" event. Before the interpreter executes a line it calls the trace function with the current frame and the string "line". (The function gets a third argument which is None; that fields is used by other events.

 

import sys
import linecache

def traceit(frame, event, arg):
    if event == "line":
        lineno = frame.f_lineno
        filename = frame.f_globals["__file__"]
        if (filename.endswith(".pyc") or
            filename.endswith(".pyo")):
            filename = filename[:-1]
        name = frame.f_globals["__name__"]
        line = linecache.getline(filename, lineno)
        print "%s:%s: %s" % (name, lineno, line.rstrip())
    return traceit

You start the tracing by calling the function defined above:

sys.settrace(traceit)

...and then your code follows.

Read more: Tracing python code, Tracing a Program As It Runs - Python Module of the Week

 

Here is a version I made some years ago, that probably works. It seems to track function calls:

def traceit(frame, event, arg):
    fo = open('/tmp/recur_log','a')
    if event != 'call':
        return
    co = frame.f_code
    func_name = co.co_name
    if func_name == 'write':
        # Ignore write() calls from print statements
        return
    func_line_no = frame.f_lineno
    func_filename = co.co_filename
    caller = frame.f_back
    caller_line_no = caller.f_lineno
    caller_filename = caller.f_code.co_filename
    fo.write(  'Call to %s on line %s of %s from line %s of %s\n' % (func_name, func_line_no, func_filename, caller_line_no, caller_filename))
    fo.close()
    return traceit

It doesn't seem to extract the module name though, can be done with:

name = frame.f_globals["__name__"]

 


Länk - Pypi remedies

published Nov 25, 2011 03:01   by admin ( last modified Nov 25, 2011 03:01 )

Just a collection of links to untested pieces of software, that I may come around to test

Update 2012-02-06:

Two more mentioned on Reddit:

 

An pypi server which automatically proxies and mirrors pypi packages based upon packages requested. It also supports the uploading of local (private) packages. Note that this is currently really, really alpha :-)
Read more: mvantellingen/localshop - GitHub

A simple application for managing a static python package index. It borrows heavily from BasketWeaver and cheese_emporium. It leverages pip and setuptools/distribute for various package management tasks.



Read more: SurveyMonkey/CheesePrism - GitHub

Please make sure you are using VirtualEnv. This will isolate yopypi from other packages:


Läs mer: Getting Started — yopypi v0.0.1 documentation

 

 

 

http://pypi.rhaptos.org is an eggs proxy cache aimed at being used by Rhaptos and Connexions developers. The goal is the prevent depending on the http://pypi.python.org infrastructure and / or external sites hosting eggs dependencies and speed up the build process. (see http://buildbot.rhaptos.org/waterfall)



Läs mer: pypi.rhaptos.org – Rhaptos-Trac

 

 


 

Setting up a PyPI mirror (with z3c.pypimirror) erstellt von Jens W. Klein — 17.08.2010 22:39 This article describes how to set up an own mirror of the Python Package index (aka Cheese-Shop)



Läs mer: Setting up a PyPI mirror (with z3c.pypimirror) — BlueDynamics Alliance

 

 


collective.eggproxy is a smart mirror for PyPI. It will collect packages on PyPI only when a program like easy_install or zc.buildout asks for it. In other words, unlike some mirrors that act like rsync and get the whole PyPI base (more than 5 gigas) collective.eggproxy will only get what you need.



Läs mer: collective.eggproxy 0.5.1 : Python Package Index

 

 

 


Länk - 3D printing

published Nov 25, 2011 02:57   by admin ( last modified Nov 25, 2011 02:57 )

 

It has sold over 5,000 of its Thing-O-Matic 3D printers, which retail for $2,500 fully assembled or $1,299 in kit-form. Meanwhile, a newcomer from the Netherlands called Ultimaker, which costs $1,700 as a kit, is winning fans for its raw speed and ability to handle larger jobs. Some wonder whether the Ultimaker could be personal manufacturing's Apple II.



Läs mer: 3D printing: Difference Engine: Making it | The Economist


Helghypotesen - Aktiemarknadens utveckling i den nära framtiden

published Nov 18, 2011 04:18   by admin ( last modified Nov 18, 2011 04:18 )

Med alla dåliga ekonomiska nyheter man läser så skulle man kunna tro att börsen skulle gå ner, men det gör den inte. Det finns till och med ett ordspråk myntat: "The market can stay irrational longer than you can stay solvent".

Jag lanserar härmed helghypotesen - att ingen vill må dåligt på helgen. Under varje vecka fram till jul kommer börsen att stiga från måndag till fredag så att alla kan må bra på helgen. Under helgen görs politiska och ekonomiska åtgärder som får börsen att öppna nedåt på följande måndag.

Denna cykel rullar på mot jul. Julen är också en helg och ju närmare julen man kommer, desto bättre vill man må under julen. Alltså går börsen upp framemot jul.

Sedan går det åt pipan!


NameVirtualHost & serving on several ports in Apache on Ubuntu 10.10

published Nov 17, 2011 11:08   by admin ( last modified Nov 17, 2011 11:08 )

Today on a temporary test setup I had the need for Apache to serve out sites on the same IP number, but on different ports (due to inflexible port forwarding on a router). According to the Apache documentation, NameVirtualHost can be written without a port specification.

NameVirtualHost *

However if you do so on Ubuntu 10.10 with some virtual hosts defined with ports, you get:

[error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported,
proceeding with undefined results

Putting in more than one NameVirtualHost, with different port numbers covering the ports used in the virtual hosts directives, gives no errors though:

NameVirtualHost *:80

NameVirtualHost *:8080

 And seems to work. You need to tell Apache to listen to all ports specified too.