Linux / Unix

Arch linux recover GRUB

Boot the archlinux cd find you linux root partition with fdisk -l mount /dev/<root partition> /mnt arch-chroot /mnt /bin/bash grub-install /dev/sda

Test network speed

Computer1(listen) root@computer1:~# nc -vln 12345 >/dev/null   Computer2(send) root@computer2:~# dd if=/dev/zero bs=1M count=1K | nc -vn 192.168.1.1 12345 Connection to 192.168.1.1 12345 port [tcp/*] succeeded! 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 16.7192 s, 64.2 MB/s

Remove ^M with Vim

These are instructions on how to get rid of ^M in text-files with the use of Vim. In Linux/Unix by pressing: :%s/^M//g Note that ^M is inserted by pressing the keystoke: Ctrl+V  Ctrl+M This is because Ctrl+V will give the escaped form of the key pressed after this. You’ll see that when you press Ctrl+V […]

Using a smart host in OpenBSD’s sendmail

Here are some quick notes of configuring sendmail(8) to transfer mail to your ISP’s smart host on a standard OpenBSD Installation. Tested with OpenBSD 4.7/i386 and 4.8/i386 First, make a copy of the default configuration. Here ‘mysettings’ is something you can name anything you’d like.