Yet another useless blog
[
Home
|
RSS 2.0
|
ATOM 1.0
]
Mon, 14 Jan 2013
this is just a short list of things i should remember about haskell:
- definitions are immutable
- ++ is slow, has to walk the hole list. : is fast
- infix/prefix functions
- !! fetches on element by index ( [1,2,3] !! 2 -> 2 )
- strings are lists of chars
- when comparing lists, the next elements are only compared if
the previous elements were equal ( [3,2,1] > [2,10,100] -> True )
- lists: head/tail/last/init
- lists II:
length/null/reverse/take/drop/maximum/minimum/product/elem
- lists support steps: [3,6..20]
- lists III: cycle/repeat
tuples:
- must now in advance how many elements
- can contain combination of types (1, "hello")
- list of tuples must contain tuples of the same type
- fst/snd only work on tuples with two elemnts
- zip
pattern matching:
posted at: 18:46 |
path: /computer |
permanent link to this entry
Wed, 09 Jan 2013
as we are testing openstack and openvswitch we needed an openvswitch
package. but it is currently only available for fedora 17/18 and not
RHEL6 or CENTOS 6. so i hacked together these two src rpms:
this
patch
is required to build openvswitch 1.7.1. it's already included in the
srpm above.
the kernel module is only required for rhel/centos 6, fedora comes with the module installed.
you are also going to need the following rpm's installend
- kernel-headers
- redhat-rpm-config
posted at: 15:49 |
path: /computer/unix |
permanent link to this entry
Fri, 28 Dec 2012
- per default the switch uses DHCP to acquire an in-band mgmt ip
address, look for an arp table entry that starts with 28:92:4a,
thats your switch. You have to ping the switch first of course...
- telnet to the ip address the switch got (e.g.
telnet 10.0.0.2
)
- you instantly become manager (note the # at the end of the prompt
- enter
setup
- assign a manager password and change the snmp public community
string
configuring ssh access:
- login to the switch via telnet and enter manager mode (
enable)
- enter
config
mode
- assign an operator password. you can also specify the username
for the operator user:
password operator user-name admin
- create a ssh keypair:
crypto key generate ssh rsa
- take a look at the keys:
show crypto host-public-key
- enable ssh access:
ip ssh
- show ssh status:
show ip ssh
- finally login to the switch via ssh:
ssh admin@10.0.0.2
configure a static ip
- show the current ip config
show ip
- set a static ip:
vlan 1 ip address 192.168.0.253/24
- set the default gateway:
ip default-gateway 192.168.0.254
saving the configuration
- just execute:
write memory<
posted at: 20:35 |
path: /computer/network |
permanent link to this entry
Mon, 05 Nov 2012
Tue, 25 Sep 2012
works with gnu awk
awk -F: '/s[0-9]/ { cmd=sprintf("/usr/sbin/lvs --unit m --noheadings -o lv_size /dev/rootvg/%slv",$1); (cmd | getline result); printf("%s \"%s\" %s\n",$1,$5,result)}' /etc/passwd
posted at: 15:06 |
path: /computer |
permanent link to this entry
Mon, 24 Sep 2012
because of a kernel oops on my brand new lenovo x230, i had to try a -rc kernel before reporting this as a bug.
this is short reminder on how i did this
$ git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux ; git archive --format=tar --prefix=linux-3.6-rc7/ v3.6-rc7 | gzip > ../linux-3.6-rc7.tar.gz
$ pacman -S abs
$ cd ~/tmp/ ; ABSROOT=. abs core/linux
$ cd core/linux; vi PKGBUID
i had to change to following lines in PKGBUILD:
pkgbase=linux-pinhead
_srcname=linux-3.6-rc7
pkgver=3.6rc7
source=("$_srcname.tar.gz"
...)
then rebuild all md5 sums
$ makepkg -g
and paste the output into the PKGBUILD file. finally create a new pkg:
$ makepkg
posted at: 20:59 |
path: / |
permanent link to this entry
Sun, 16 Sep 2012
Thu, 06 Sep 2012
Mon, 03 Sep 2012
All watched over by machines of loving grace.
couldn't find a downloadable version of the movie above. but thanks
to fefe here's an online version.
posted at: 00:00 |
path: / |
permanent link to this entry
Sat, 01 Sep 2012
restartet blogging and moved to pyblosxom.
posted at: 00:00 |
path: / |
permanent link to this entry
Thu, 01 Jan 1970
- cd /usr/share/doc/bluez-utils/examples
- gzip -d passkey-agent.c.gz
- apt-get install libdbus-1-dev
- apt-get install bluetooth
- make
- ./passkey-agent --default 1234
- wvidal umts
wvdial configuration:
[Dialer Defaults]
Modem = /dev/rfcomm0
Baud = 115200
SetVolume = 0
Dial Command = ATDT
FlowControl = NOFLOW
Init1 = ATZ
Init2 = ATM0
[Dialer umts]
Username = ppp@A1plus.at
Password = ppp
Phone = *99***1#
Stupid Mode = 1
Init3 = AT+CGDCONT=1,"IP","A1.net"
Dial Attempts = 3
posted at: 00:00 |
path: /computer |
permanent link to this entry
very interesting article about the
PowerPC G5 CPU
posted at: 00:00 |
path: /computer/hardware |
permanent link to this entry
Project24 is _very_ useful.
now i have all austrian holidays, time of sunrise / sunset and all
moon phases in my ical/palm.
posted at: 00:00 |
path: /computer |
permanent link to this entry
my blog entries are managed via git. normally i git-push changes form a checked-out version
to my webserver, where the blog is hosted. problem is, after the push the checkout-out files
are not automatically updated. One solution is to use a third bare git repo to push into, but
there's another way
git push to a non-bare repository
posted at: 00:00 |
path: /computer |
permanent link to this entry
- adduser username kvm
- boot windows xp iso image:
kvm -m 1200 -hda winxp.img -net nic,model=e1000 -cdrom winxp_sp3.iso
- network configuration (nat)
tunctl -u pinhead
ifconfig tun0 192.168.1.1
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
network configuration (bridge)
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 tap0
posted at: 00:00 |
path: /computer |
permanent link to this entry
10:55 27.09.2004 < miqorz> my eyes hurt. perhaps I should i wear my glasses o_O
10:55 27.09.2004 < pandzilla> miqorz: just place an aquarium in front of your monitor
posted at: 00:00 |
path: /computer/irc |
permanent link to this entry
after reading a paper on
this page, i created the following
script (/etc/daily.local)
#!/bin/sh
chown -R root:wheel /Library/StartupItems
chmod -R og-w /Library/StartupItems
posted at: 00:00 |
path: /computer/mac |
permanent link to this entry
nifty little utility
posted at: 00:00 |
path: /computer/network |
permanent link to this entry
the last few days i spent most of my spare time configuring my wireless network.
a few weeks ago i bought a linksys wrt54gs wireless accesspoint. it's really a
nice peace of hardware but coverage is a little bit low. to have full wireless
access in my hole flat i had to extend the wlan via a second ap.
being a little apple fan (writing this entry on my 15'' powerbook) i bought an airport express.
regarding
this review,
wds should work between the linksys and the airport. following the instructions in
this
blog it worked out quite well.
next step was security. first i was using wpa enterprise via the linksys router. but if you are using wds, wpa will
not work. so i had to change my config to ipsec. thanksfully to apple configuring ipsec between a freebsd gateway and
os x is not a problem at all. os x uses the freebsd network stack, so the config files can be copied.
the
NetBSD IPSEC FAQ was very valuable.
my
racoon.conf and my
ipsec.conf. don't be too
disappointed if i'm not showing my
psk.txt file.
UPDATE
i forgot to mention that wds will not work with the linksys standard firmware.
you have to get
this one.
posted at: 00:00 |
path: /computer/network |
permanent link to this entry
after reading
this article, i started to pull my dotfiles into cvs.
i am a long time cvs user (mainly for scripts, documentation and that stuff),
and always wanted to manage my dotfiles with cvs.
now, i have a cvs project dotfiles, with a corresponding entry in CVSROOT/modules:
dotfiles -o .dotfiles/cvsfix -d .dotfiles dotfiles/
here you find the cvsfix script.
next step will be a public accessible cvs-repository so i can share my dotfiles.
to be continued...
posted at: 00:00 |
path: /computer |
permanent link to this entry
in the never ending search for the perfect shell, i am now learning zsh.
bought the book
From Bash to Z Shell, looks promising to me.
skimmed through the first chapter which is very basic (what is a shell,
what are unix processes, entering commands,...). hopefully
the next chapters will be more technical.
this site is very useful. thanks michael, for
your well documented
.zshrc
posted at: 00:00 |
path: /computer/unix |
permanent link to this entry
finally my
zshrc and
zshenv. be aware this is work in progress...
posted at: 00:00 |
path: /computer/unix |
permanent link to this entry