Erlang and posix error
Second day testing of pop3 server written in erlang:
{{case_clause,{error,enotconn}}…
Today i find all posix errors in http://erldocs.com/R14B/kernel/inet.html?i=11&search=inet
I think it’ll be usefull.
Erlang] Using privileged ports
On UNIX systems, ports starting with 0 and 1023 are privileged. To work successfully with these ports of Erlang in a terminal just type:
setcap ‘cap_net_bind_service = + ep’ / usr/lib/erlang/erts-5.6.5/bin/beam
setcap ‘cap_net_bind_service = + ep’ / usr/lib/erlang/erts-5.6.5/bin/beam.smp
Naturally with your version of erts.
[bash] Script for application runing
Hello,
I found bash script for runing something application from terminal and uncoupling this application from terminal:
#!/bin/bash if [ -z "$TEMP" ]; then TEMP='/tmp'; fi; $@ > "$TEMP/$$.stdout.log" 2> "$TEMP/$$.stderr.log" & echo "fork: \"$@\" : $$"
[bash] Script for chekcing mail in gmail.com
I want to share a simple script written in bash, which checks the mail at gmail.com
#!/bin/bash read -p "Input your name in gmail: " username; read -p "Input your password in gmail: " password; echo -e "Checking for new messages... \c" atomlines=`wget -T 3 -t 1 -q --secure-protocol=TLSv1 \ --no-check-certificate \ --user=$username --password= $password \ https://mail.google.com/mail/feed/atom -O - \ | wc -l` echo -e "\r\c" [ $atomlines -gt "8" ] \ && echo -e " You have new gmail." \ || echo -e " No new gmail."
I hope it is useful to you. p.s. The remaining useful scripts can be found at – https: / / github.com / onlyshk / bash-snippets
A set of useful bash scripts
As is well known *nix users have a huge advantage over Windows users due to lack of the latter such a powerful tool like bash. I myself often use bash scripts. So I decided to share with the community of my bash scripts.
On github, created a repository bash-snippets where and I will add a script written in bash, which I hope were helpful would be useful to you.
Git – https://github.com/onlyshk/bash-snippets
License – GNU/GPL v3
Participation in the project are welcome. Who has accumulated useful scripts and I think everyone inveterate * nix user any fork this project in github and add your own scripts. Then are connected into a single repository. However, we collect useful communities in the collection of scripts.
I hope it’ll be helpful.
Today has found in internet very interesting prizentatsiyu of Erlang:
Autotools generate giant makefiles for projects. Here i put simple makefile for gtk+ application compiling:
CC=gcc
LDLIBS='gtk-config --libs'
CFLAGS=-Wall -g 'gtk-config --cflags'
gtktest: gtktest.o
$(CC) $(LDLIBS) gtktest.o -o gtktest
gtktest.o: gtktest.c
$(CC) $(CFLAGS) -c gtktest.c
clean:
rm -f gtktest
rm -f *.o


