Friday, September 30, 2011
Monday, September 19, 2011
Notes - Adding stability improvements to the mood lamp
If yo want to store chart data for public serving, It's necessary to have dropbox running, due to encryption issues maybe if you reboot your computer it will not run until you log in and mount your home so first thing run dropbox
service dropbox start
bash -c '/usr/bin/screen -dmS minic minicom -o'
#this is if you put some services with symlink under /service
#svscanboot will run them, but Im not using them form now
csh -cf '/command/svscanboot &'
#main soft running supervised and under a screen terminal
bash -c '/usr/bin/screen -dmS lamp supervise /home/me/scripts/animo'
Posted by Dani 0 comments
Friday, September 16, 2011
Notes - Web scrapping ajax obfuscated websites
Im using a perl script that calls selenium server, then I use Beautiful soup to nicely parse the rendered output coming from selenium. Probably using webkit could be done more nicely but this way is easy and quick to setup.
Just wanted to write this note so I don't forget the pipes that I'm doing. :)
Really it is not needed to get data first with perl, rc selenium export to python (Remote Control) it is enough later to get the source and parse it.
To get the source code in python use:
data = sel.get_html_source()
if you're using perl:
my $data=$sel->get_html_source();
Posted by Dani 1 comments
Sunday, September 11, 2011
Notes - Monitor an event and send email when it occours
tail -f /var/log/messages | awk '/now/ {system("mail -s 'hi' myemail@mydomain.com < /dev/null")}'
interesting for /var/log/auth for example...
Posted by Dani 0 comments
Notes - Record shell session for later replay (educational use)
script -t 2> tutorial.timing -a tutorial.session
type ‘exit’ to end the recording.
Replay goes like this
scriptreplay tutorial.timing tutorial.session
Posted by Dani 1 comments
Notes - How to create an encrypted tar
tar -zcvf -stuff | openssl des3 -salt -k secret_pass | dd of=stuff.des3
Posted by Dani 1 comments
Saturday, September 10, 2011
workaround for skype without headphones on ubuntu lucid 64
Posted by Dani 0 comments
Tuesday, September 06, 2011
Installing Latex gui Lyx from source
sudo su
aptitude install build-essential libqt4-dev libaspell-dev
cd /usr/local/src/
wget ftp://ftp.lyx.org/pub/lyx/stable/2.0.x/lyx-2.0.0.tar.gz
gzip -dc lyx-2.0.0.tar.gz | tar xf -
cd lyx-2.0.0
./configure
make
make install
apt-get install texlive-latex-extra
Posted by Dani 0 comments
Sunday, September 04, 2011
Installing ubuntu from Internet via usb key
Dammit, after 2 weeks vacations without using my main desktop pc, ubuntu natty stopped working. Don't have time to troubleshoot, so rolling back to LTS lucid.
Got the netboot.tar.gz file from:
http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/
and then wrote it to a usb key with imagewriter
sudo apt-get install usb-imagewriter
sudo usb-imagewriter
info from:
https://help.ubuntu.com/community/Installation/FromImgFiles
boot from usb and install
Posted by Dani 0 comments