Monday 15 December 2014

The alcoholic society: addiction and recovery of the self.

Friday 28 November 2014

sudo mount 192.168.1.xxx /mnt/media

requires,

sudo apt-get install nfs-kernel-server

Tuesday 25 November 2014

Air conditioning

http://www.johnlewis.com/electrolux-exp12hn1wi-portable-air-conditioner-white/p231882244

Monday 24 November 2014

Guitar stuff

http://ds.mk-guitar.com/effects.htm

Monday 3 November 2014

Projecting!

BenQ W1070 £500 & Sapphire SWS240WSF-ASR2 106inch £200

Wednesday 29 October 2014

Impressive pandas python web data code snippet from stack overflow.

import itertools
import datetime as dt

import numpy as np
import pandas as pd
from pandas.io.html import read_html


dfs = read_html('http://www.epexspot.com/en/market-data/auction/auction-table/2006-01-01/DE',
                attrs={'class': 'list hours responsive'},
                skiprows=1)

df = dfs[0]

hours = list(itertools.chain.from_iterable([[x, x] for x in range(1, 25)]))
df[0] = hours

df = df.rename(columns={0: 'a'})
df = df.rename(columns={1: 'b'})
df = df.set_index(['a', 'b'])
#df = df.set_index([0, 1])

today = dt.datetime(2006, 1, 1)
days = pd.date_range(today, periods=len(df.columns), freq='D')

colnames = [day.strftime(format='%Y-%m-%d') for day in days]
df.columns = colnames

Wednesday 22 October 2014

Disk usage (du) sorted by human readable size:

From https://gist.github.com/xentek/3490293

du -s ./* | sort -n| cut -f 2-| xargs du -sh {}

Monday 20 October 2014

Great post on ssh and .ssh/config including port forwarding

http://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/

Saturday 18 October 2014

full screen ubuntu in an oracle vm

Day 1: Sort it.  A search, a line in the terminal, done.

Day 2:  New VM.  A search.  NO JOY.

Day 3:  New searches.  I find it again.

How can it be so damn hard?!

Anyway, in the VM: 

sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11


Thank you. No big deal. No freaking mouse clicks. No idiocy.

Friday 3 October 2014

From http://www.huffingtonpost.co.uk/2014/10/01/8-vegetarian-quotes-world-vegetarian-day_n_5912360.html?utm_hp_ref=mostpopular

Earth provides enough to satisfy every man's need, but not every man's greed.  Mohandas Gandhi.

If slaughterhouses had glass walls, everyone would be a vegetarian.  Paul McCartney.

Flesh eating is unprovoked murder.  Benjamin Franklin.

A man can live and be healthy without killing animals for food; therefore, if he eats meat, he participates in taking animal life merely for the sake of his appetite.  And to act so is immoral.  Leo Tolstoy.

My body will not be a tomb for other creatures.  Leonardo Da Vinci.

However scrupulously the slaughterhouse is concealed in the graceful distance of miles, there is complicity.  Ralph Waldo Emerson.

There is no fundamental difference between man and animals in the their ability to feel pleasure and pain, happiness, and misery.  Charles Darwin.

Nothing will benefit human health and increase the chances of survival of life on earth as much as the evolution to a vegetarian diet.  Albert Einstein.

Need a quote incriminating all those who argue against it, too.....  Idiots.  Assholes.

Tuesday 19 August 2014

thermoacoustic heatengine.

http://en.wikipedia.org/wiki/Thermoacoustic_heat_engine

Thursday 14 August 2014

Tuesday 12 August 2014

mutt. spam.

http://chrisjrob.com/2011/03/23/configuring-mutt-for-spam/

Add:



# Move message(s) to Spam/Verified by pressing "S"
 macro index S "unset resolveNset resolve=INBOX/spam/verified" "file as Spam"
 macro pager S "=INBOX/Spam/Verified" "file as Spam"

# Move message(s) to Spam/Ham by pressing "H"
 macro index H "unset  resolveNset  resolve=INBOX/spam/ham"  "file as Ham"
 macro pager H "=INBOX/Spam/Ham" "file as Ham"

# Return to Inbox by pressing "."
 macro index . "=INBOX"  "Inbox"



To ~/.muttrc


Thursday 10 July 2014

Signing into pop free-online with mutt

c
pop://mail.free-online.net

user: my name, no full stops.

Add to mutt with its fetchmail function.  Press, `G' to execute.  Add to .muttrc:

set pop_host="pop://username@mail.free-online.net"

Wednesday 9 July 2014

cygwin ssh with X forwarding

Also set up cygwin
at home to ssh into work with X forwarding.  Use
ssh -XCY work, use the XYC flag for each hop. Did about
an hour at home.  To use with cygwin install
openssh, xorg-server, xinit.

Sunday 29 June 2014

adding a linux printer

29/June/2014

system-config-printer

.... but who really cares.  :(

Saturday 28 June 2014

openfoam chtmultiregionsimplefoam with ami

http://www.cfd-online.com/Forums/openfoam-solving/86273-non-conformal-coupling-interfaces-chtmultiregionfoam.html

Friday 20 June 2014

OpenFOAM: negative volumes on good looking mesh. Empty sample results.

blockMesh defined with incorrect topology:


Far nodes:


4   5
0   1


Near nodes:

7  6
3  2


I used topo 0 1 2 3 4 5 6 7 and the mesh created okay, with warnings during blockMesh:

 Creating block mesh topology
--> FOAM Warning :
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -1.66667e-05 for face 0



(ignored, obviously).  On sample, tets could not be created.  checkMesh showed all cells to be stretched and negative volume; paraFoam showed them as okay.

Anyway, using the (correct) topo  : 3 2 1 0 7 6 5 4

fixed all this.

Tuesday 17 June 2014

Guitar stuff.

BT feat Jes.  Every other way.  Guitar pickings.

Monday 9 June 2014

xchat

interesting

openFoam errors and fixes!

From the terminal running paraFoam:

--> FOAM FATAL IO ERROR:
Please supply the offsetMode as one of
3
(
uniform
nonuniform
normal
)

This was from using Paraview 3.12.0 with openFoam 2.3.

Installing updated foam and paraview (well, parafoam) fixed this.  The same directory now works fine.

Friday 30 May 2014

Colour directories in bash

export LS_COLORS='di=00'

Works!

export LS_COLORS='di=07'

is clear.


0 = default colour
1 = bold
4 = underlined
5 = flashing text
6 = no change
7  = reverse field
8 = black
9 = strikethrough
10 - 29= no change
30  = light green
31  = red
32  = green
33  = orange
34  = blue
35  = purple
36  = cyan
37  = grey
38 = underline
39 = no change
40  = black background
41  = red background
42  = green background
43  = orange background
44  = blue background
45  = purple background
46  = cyan background
47  = grey background
90  = dark grey
91  = light red
92  = light green
93  = yellow
94  = light blue
95  = light purple
96  = turquoise
100 = dark grey background
101 = light red background
102 = light green background
103 = yellow background
104 = light blue background
105 = light purple background
106 = turquoise background

Tuesday 29 April 2014

parties

www.goabase.net
www.accessallareas.net

Wednesday 16 April 2014

youtube links

https://www.youtube.com/watch?v=Warq_KUocB4

Thursday 10 April 2014

Amusing kung-fu episodes

Sifu:  Use this defence if someone attacks you with a knife like this ...
Student: But what if it was like this instead ...
Sifu: Well we were talking about a certain situation, but in your instance you could ...
Student: What if he had two knives?
Sifu: ...
Student: What if one of the knives was a bunch of flowers and the person had really bad hayfever?


Tuesday 25 March 2014

openFoam wisdom

Specify velocity AND pressure at a boundary and expect continuity errors.  Set zero gradient (not non-zero gradient) and velocity.

------------------

Calculate initial k and epsilon values with this script:

#!/bin/sh 
echo ' ===========================================' 
echo ' give me Uref, Turbulent Intensity and L' 
echo ' I will give you TKE and epsilon for inlet' 
echo ' ===========================================' 
### 
Uref=$1 
ti=$2 
L=$3 
tke=$(echo "scale=4;1.5 *($Uref * $ti)^2"|bc -l ) 
epsilon=$(echo "scale=4;0.09^(3/4)*$tke^(3/2)/$L"|bc -l) 
echo 'tke =' $tke 
echo 'eps =' $epsilon 

(matejfor, http://www.cfd-online.com/Forums/openfoam-solving/57839-simplefoam-time-step-continuity-errors.html)

------------------


Friday 14 March 2014

make: *** No rule to make target `smoothRampFixedValue/smoothRampFixedFalueFvPatchFields.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop.


Spelling mistake in Make/files

Monday 10 February 2014

Tuesday 21 January 2014

Fluxbox rotate second screen

/etc/X11/xorg.conf :


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection



Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro NVS 290"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro NVS 290"
    BusID          "PCI:2:0:0"
    Option "RandRRotation" "on"
# http://ubuntunation.blogspot.co.uk/2009/11/howto-rotate-screen-in-linux-using.html    
# http://ubuntuportal.blogspot.co.uk/2007/02/how-to-setup-pivot-screen-rotation-with.html
# Now do, $ xrandr -o left" or so.
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "ProbeAllGpus" "True"
    Option         "TwinViewOrientation" "Clone"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "ProbeAllGpus" "True"
    Option         "TwinViewOrientation" "Clone"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


$ sudo xrandr --screen 1 -o left

Add that command

Wednesday 15 January 2014

openFoam errors and fixes.

on $ blockMesh


--> FOAM FATAL IO ERROR:
"ill defined primitiveEntry starting at keyword 'blocks' on line 55 and ending at line 125"

a result of using,


   hex(0 1 2 3 4 5 6 7) (10 10 1) simpleGrading (10 1 1)

Changing to 

 hex (0 1 2 3 4 5 6 7) (10 10 1) simpleGrading (10 1 1)

fixed things.  Watch those spaces.

--------------------------------

$ blockMesh
$ chtMultiRegionSimpleFoam


--> FOAM FATAL ERROR:
Cannot find file "points" in directory "air/polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 188.

FOAM exiting

This occurs in the tutorial also.  Do,

$ blockMesh
$ topoSet
$ splitMeshRegions -cellZones -overwrite
$ chtMultiRegionSimpleFoam


-------------------------------