First I created a ~/.mailrc file containing: set smtp-use-starttls set ssl-verify=ignore set smtp=smtp://$SMTPSERVERMYISP:587 set smtp-auth=login set smtp-auth-user=$SMTPLOGINACCOUNT set smtp-auth-password=$SMTPLOGINACCOUNTPASSWORD set from=”$MYEMAILADDRESS ($MYNAME)” Then sending an email is just as simple as: $mail someone@someonesisp.com Then give the subject and start typing your message. Sending will be done by pressing CTRL-D.
Category Archives: /linux
read data from hyt 271 (c code)
plaatje + text pi@raspberrypi ~/bin $ vi readhyt.c #include <stdio.h> #include <fcntl.h> /*file control options. ie for open file use O_RDWR*/ #include <sys/ioctl.h> #include <linux/i2c-dev.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <unistd.h> /* sleep */ #include <dirent.h> int main() { int fh; unsigned char buf[4]; float h, t; fh = open(“/dev/i2c-1”, O_RDWR); ioctl(fh,I2C_SLAVE,0x28); buf[0] […]
pandaboard: wifi accesspoint, alcatel hsdpa / sms
1. download ubuntu 12.04 armhf version (http://cdimage.ubuntu.com/releases/12.04.2/release/) 2. unzip file (right click> extract here) and dd to an sd card: $sudo dd if=precise-preinstalled-desktop-armhf+omap4.raw of=/dev/sdd bs=4M 3. insert sd card in pandaboard. boot. answer some installation questions. 4. install advanced vi (vim). $sudo apt-get install vim 5. install openssh-server $sudo apt-get install openssh-server 6. main user […]
got the hsdpa dongel to work….
1. a working internet connection: $ sudo wvdial vodafone –> WvDial: Internet dialer version 1.61 –> Initializing modem. –> Sending: ATZ ATZ OK –> Sending: ATZ ATZ OK –> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK –> Sending: AT+CGDCONT=1,”IP”,”live.vodafone.com” AT+CGDCONT=1,”IP”,”live.vodafone.com” OK –> Modem initialized. –> Sending: […]
Search for installable versions of a package (apt-get)
For a project I had to downgrade the xorg to a lower version. To know what versions are available, the mansion option comes in handy. $sudo apt-cache madison xserver-xorg-core Results in my case (ubuntu 12.04.1) in: xserver-xorg-core | 2:1.11.4-0ubuntu10.12 | … xserver-xorg-core | 2:1.11.4-0ubuntu10.6 | … xserver-xorg-core | 2:1.11.4-0ubuntu10 | … xorg-server | 2:1.11.4-0ubuntu10 | […]
Turn raspberry pi quickly in an accesspoint
I bought a very cheap wifi dongle on ebay. With a ralink rt5370 (get them for 4 euros a piece). First thing I did edit the /etc/network/interface, that now looks like: auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto wlan0 iface wlan0 inet static address 10.0.0.1 netmask 255.255.255.0 Now I […]
rsync
My files are archived to another machine with rsync. Using a command like: $rsync -avh [from dir] [knilluz@server:/to dir] There is only one annoying issue with this command. The trailing slash. rsync -avh /home/knilluz/dirtobackup/ knilluz@zerver:/backup/xxx will lead to another result than: rsync -avh /home/knilluz/dirtobackup knilluz@zerver:/backup/xxx In one case the name of the directory ‘dirtobackup’ will […]
Semantics vs. Presentation in HTML
[source] >> cut’npaste >> Semantics vs. Presentation in HTML One of the holy grails in modern web development is separation of content and presentation. This is often understood to mean a separation of HTML and CSS, but it goes deeper than that. In order to take full advantage of the concept, first we need to understand […]
shutdown te server after 704 days and 6 and an half hours.
Got this mail from our hostingprovider: “Op 19 december a.s. hebben wij tussen 00.05 en 00.30 onderhoud gepland aan rack X99.” loads of blah blah blah. Wij zullen de PDU in dit rack vervangen. Dit houdt in dat alle servers die op dat moment nog aan staan een power boot zullen krijgen. Wij raden u […]
Fail2ban banned way to happy…..
Fail2ban happily blacklisted a bunch of ipadresses (putting ip addresses from naughty hacking users as DROP lines in iptables). Here I describe the commands to remove these banned ip addresses. Execute them as user root or sudo. List all current iptable rules: #iptables -L -n –line-numbers […] Chain fail2ban-APACHE (3 references) num target prot opt […]