cl search engine

tisdag, september 08, 2009

wow mouseover macro

#showtooltip Rejuvenation
/cast [target=mouseover,exists][target=target,exists][target=player] Rejuvenation

tisdag, juni 30, 2009

how to drop the cache in linux

echo 1 > /proc/sys/vm/drop_caches

onsdag, juni 24, 2009

reconfigure laptop screen from suspend

Put the following into /etc/pm/sleep.d to make reconfigure the screens
after suspend or hibernation. Nice to have if you have suspended with a
different screen configuration.


#!/bin/bash

. /usr/lib/pm-utils/functions

case "$1" in
hibernate|suspend)
;;
thaw|resume)
export DISPLAY=:0
export XAUTHORITY=/home/username/.Xauthority
xrandr --auto
;;
*)
;;
esac

exit

suspend/hibernate with nvidia on dell latitude 820

Grabbed the text from internetarchive, you never know...

Suspend to RAM on the Dell D820, proprietary NVIDIA drivers under Ubuntu Gutsy

It works for Debian Sid too (tested). Anyone tried this on other Dell Latitude models? Please report your results by E-mail ;)

There should be everything here to get it work. That's what I did on a fresh Ubuntu Gutsy, after installing the proprietary driver.

/etc/X11/xorg.conf extracts

Section "Device"
Identifier "nVidia Corporation G72M [GeForce Go 7400]"
Driver "nvidia"
Busid "PCI:1:0:0"
Option "UseEDIDDpi" "False"
Option "AddARGBVisuals" "True"
Option "AddARGBGLXVisuals" "True"
Option "NoLogo" "True"
Option "NvAGP" "1"
EndSection

/etc/defaults/acpi-support changes

SAVE_VBE_STATE=false #ex-true
POST_VIDEO=false #ex-true
USE_DPMS=false #ex-true
LOCK_SCREEN=false #ex-true

tisdag, april 14, 2009

new buils for feral tree

Lets try this tonite:

   http://www.wowhead.com/?talent=0ZxGMsfrd0xRhhuAo0Eczb


lets keybind natures grasp



söndag, april 12, 2009

resan till hjortviken

så här förväntar jag mig att det skall köras...
resan

fredag, mars 13, 2009

python flattening an iterable

this should work on any iterable
flatten = lambda t: sum(map(flatten, t), ()) if hasattr(t, ‘__iter__’) else (t,)

this is just for tuples
def flatten(tpl):
return sum(map(flatten, tpl), ()) if type(tpl) is tuple else (tpl,)

t= (1, (1, 2, (1, 2, 3), 3))
print flatten(t)

onsdag, februari 18, 2009

small tools for cmdline

Noted at programming.reddit.com about j:

   http://wiki.github.com/rupa/j

the orginal version is:
   http://wiki.github.com/joelthelion/autojump

cd () { builtin cd "$@" && test -n "$1" && { history -s cd 'pwd' ; } ; }
<code>cd() { if [[ $1 == "-" ]]; then pushd; else pushd -n $PWD >/dev/null; builtin cd $1; fi }<br /></code></pre><br /><pre><code>alias dirs='dirs -v'<br /><br />setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups<br /><br /></code>


lördag, januari 31, 2009

easy update of ubuntu/debian

dpkg --get-selections > file

cat file > dpkg --set-selections

sudo apt-get dselect-upgrade

söndag, januari 11, 2009

100 pushups and situps

Dags att börja! körde första dagen idag. http://www.pushupslogger.com/plog/show_user?user_id=12296 Det funkar bra, löjligt att det är jobbigare att
göra situps än armhävningar

running

Ett helt ok träningspass, sprang 7,2km enligt http://www.gmap-pedometer.com/?r=2483423
Gick alldeles för långsamt dock, ca 10,6km/h lungorna är inte riktigt ifatt än.

torsdag, december 18, 2008

torsdag, oktober 23, 2008

simple tutorial for report.an

found this simple tutorial on reportlab.

måndag, april 28, 2008

c preprocessor tricks C #define enum macro macros string concatenation

c preprocessor tricks C #define enum macro macros string concatenation:

"#include

#define NAMES C(RED)C(GREEN)C(BLUE)

#define C(x) x,

enum color { NAMES TOP };

#undef C

#define C(x) #x,

const char * const color_name[] = { NAMES };

int main( void )
{ printf( 'The color is %s.\n', color_name[ RED ]);
printf( 'There are %d colors.\n', TOP ); }"

tisdag, april 01, 2008

torsdag, februari 14, 2008

easy file sharing in python

python -c "import SimpleHTTPServer;SimpleHTTPServer.test() will serve
files in current dir.

Fast, easy and fun

torsdag, november 22, 2007

view jffs2 filesystem on desktop

modprobe mtdcore
modprobe jffs2
modprobe mtdram
modprobe mtdchar
modprobe mtdblock

dd if=image-jffs2 of=/dev/mtd0
mkdir /mnt/jffs2
mount -t jffs2 /dev/mtdblock0 /mnt/jffs2

fredag, augusti 31, 2007

sicp again

Watched sicp lecture 2b yesterday, time to get this damn ball rolling again...

Will try to follow this group