Στη δουλειά με ποδήλατο

Advertisement

Converting OS X .plist to XML

The failure of my MacBook Pro seems that it didn’t cost much in terms on data loss, actually all the really crucial data were there. There are though some bits here and there that need to be moved over to my Linux box. One of the most important for everyday use the was the feed list for my RSS Aggregator. I was using the elegant, nice and simple NewsFire which uses binary plists (XML-like) for storing the feed list and I was never bothered exporting the feed list to OPML. The plist command in OS X can convert the .plist file into a .xml file, however I had no other Mac to do this operation or copy over the plist and export in OPML from there. Therefore I had to find a workaround for getting the plist working on RSSOwl or Liferea. Found the Perl plutil for Linux which converted the binary plist to standard XML. RSSOwl managed then to import the XML with all the blogs’ feeds as on NewsFire.

Regarding liferea, it wouldn’t import the XML file as it wasn’t proper OPML. But since RSSOwl imported the XMl file, I exported the feed list as OPML, which would be imported into Liferea or any other application.

Δυμόκαστρο Θεσπρωτίας – ζώα και φυσίγγια στον αρχαιολογικό χώρο

Τις προάλλες επισκέφθηκα και ακόμη μία φορά το Δυμόκαστρο Θεσπρωτίας. Μία αρχαία καστροπολιτεία, ταυτίζεται με την αρχαία Ελίνα, η οποία βρίσκεται σε έναν πανέμορφο λόβο πάνω από τη παραλία Καραβοστάσι, δίπλα στον Αρίλλα. Σώζονται αρκετά ευρήματα και η θέα προς το Ιόνιο είναι μαγευτική, βλέποντας από τη Λευκάδα μέχρι και τη Κέρκυρα.

Προς απογοήτευση μου όμως, παρά την προστασία με φράχτες κλπ., αντίκρυσα την είσοδο οικόσιτων βοειδών στον αρχαιολογικό χώρο καθώς επίσης και αρκετά φυσίγγια.  Ανέφερα (με φωτογραφικά στοιχεία) το συγκεκριμένο περιστατικό στην ΛΒ΄ ΕΠΚΑ η οποία είναι υπεύθυνη για τον συγκεκριμένο χώρο και έλαβα τη παρακάτω απάντηση από τον αναπληρωτή προϊστάμενο:

ΘΕΜΑ: «Παρουσία ζώων στον αρχαιολογικό χώρο Δυμοκάστρου»

ΣΧΕΤ.: (α). Το από 23.01.2012 ηλεκτρονικό μήνυμά σας.

 Σε απάντηση του ανωτέρω σχετικού ηλεκτρονικού σας μηνύματος σχετικά με την παρουσία ζώων και κυνηγών στον αρχαιολογικό χώρο του Δυμοκάστρου Θεσπρωτίας, σας γνωρίζουμε ότι η Υπηρεσία μας έχει το τελευταίο χρονικό διάστημα επανειλημμένα ενημερώσει τις αρμόδιες αρχές (αστυνομικό τμήμα Πέρδικας και τους ιδιοκτήτες οικόσιτων κοπαδιών ζώων) για την ανάγκη απομάκρυνσής τους από τον αρχαιολογικό χώρο και για την τακτική διέλευση αστυνομικών αποσπασμάτων από την ευρύτερη περιοχή, ώστε να αποφευχθούν οι παραβιάσεις εντός του χώρου, αλλά και τυχόν κρούσματα λαθρανασκαφών.

Ευελπιστώντας ότι σχετικά θέματα θα αντιμετωπιστούν μελλοντικά, σας ευχαριστούμε θερμά για το ενδιαφέρον σας και παραμένουμε στη διάθεσή σας για οποιαδήποτε περαιτέρω πληροφορία.

Ακόμη και εάν ληφθούν μέτρα προστασίας, η νοοτροπία των συγκεκριμένων κατοίκων της γύρω, προφανώς, περιοχής, πρόκειτε ν’αλλάξει; Των παιδιών τους;

Shell script for NITROX calculations

The following script was developed for providing quick calculations over NITROX diving. It provides an interactive menu for the following calculations:

1 – Maximum Operational Depth (MOD)
2 – Operational Depth (OD)
3 – Best mix
4 – Equivelant Air Depth (EAD)
5 – Nitrogen percentage compared to Air
6 – Oxygen partial pressure (PO2)
7 – Central Nervous Systems Toxicity (CNS)
8 – Absolute pressure

############################################################################
# Copyright (C) 2011  Panagiotis Kritikakos <panoskrt@gmail.com>           #
#                                                                          #
#    This program is free software: you can redistribute it and/or modify  #
#    it under the terms of the GNU General Public License as published by  #
#    the Free Software Foundation, either version 3 of the License, or     #
#    (at your option) any later version.                                   #
#                                                                          #
#    This program is distributed in the hope that it will be useful,       #
#    but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
#    GNU General Public License for more details.                          #
#                                                                          #
#    You should have received a copy of the GNU General Public License     #
#    along with this program.  If not, see <http://www.gnu.org/licenses/>. #
############################################################################
#!/bin/bash

disclaimer()
{
echo "
=======================================================
Every individual diver is responsible for planning
and conducting dives using SCUBA equipment up to the
trained and certified qualification he or she holds.

The creator of this program does not have any
responsibility for symptoms of Decompressions Sickness
when the suggested values of this program are used
for conducting a dive.
========================================================
"
}
mod(){
   echo -n "NITROX mix: "; read mix
   MOD=`echo "scale=2; (((1.6/$mix)*10)*100)-10" | bc`
   echo " MOD for $mix NITROX: $MOD"
}

od(){
   echo -n "NITROX mix: "; read mix
   OD=`echo "scale=3; (((1.4/$mix)*10)*100)-10" | bc`
   echo " OD for $mix NITROX: $OD"
}

bestmix(){
   echo -n " Depth: "; read depth
   BESTMIX4=`echo "scale=2; 1.4/(($depth/10)+1)" | bc`
   BESTMIX6=`echo "scale=2; 1.6/(($depth/10)+1)" | bc`
   echo " Best mix for 1.4 PO2: $BESTMIX4"
   echo " Best mix for 1.6 PO2: $BESTMIX6"
}

ead(){
   echo -n " Depth: "; read depth
   echo -n " NITROX: "; read nitrox
   EAD=`echo "scale=2; ((((1-($nitrox/100))*4)/0.79)-1)*10" | bc`
   echo " EAD for $depth MSW and NITROX $nitrox: $EAD"
}

compare(){
   echo -n " NITROX: "; read nitrox
   EQU=`echo "scale=2; 100-(((1-($nitrox/100))/0.79)*100)" | bc`
   echo " ${EQU}% less nitrogen"
}

po2(){
   echo -n " Depth: "; read depth
   echo -n " NITROX: "; read nitrox
   PO2=`echo "scale=2; (($depth+10)/10)*($nitrox/100)" | bc`
   echo " PO2 at $depth MSW for NITROX $nitrox: $PO2 ATM"
}

cns(){
   echo -n " PO2 [1.4, 1.5, 1.6]: "; read po2
   echo -n " Duration: "; read duration
   if [ "$po2" == "1.4" ]; then
      CNS=`echo "scale=2; ($duration/150)*100" | bc`
   elif [ "$po2" == "1.5" ]; then
      CNS=`echo "scale=2; ($duration/120)*100" | bc`
   elif [ "$po2" == "1.6" ]; then
      CNS=`echo "scale=2; ($duration/45)*100" | bc`
   else
      echo " Choose between 1.4, 1.5 and 1.6 PO2"
      exit 1
   fi
   echo " CNS for $duration minutes and $po2 PO2: ${CNS}%"
}

absolute(){
   echo -n " Depth: "; read depth
   ABS=`echo "scale=2; (($depth/10)+1)" | bc`
   echo " Absolute pressure at depth of $depth MSW: $ABS ATM"
}

echo " 1 - Maximum Operational Depth (MOD)"
echo " 2 - Operational Depth (OD)"
echo " 3 - Best mix"
echo " 4 - Equivelant Air Depth (EAD)"
echo " 5 - Nitrogen percentage compared to Air"
echo " 6 - Oxygen partial pressure (PO2)"
echo " 7 - Central Nervous Systems Toxicity (CNS)"
echo " 8 - Absolute pressure"
echo
echo -n " Function: "; read option
disclaimer
case "$option" in
	1)
	  mod
	  ;;
	2)
	  od
	  ;;
	3)
	  bestmix
	  ;;
	4)
	  ead
	  ;;
	5)
	  compare
	  ;;
	6)
	  po2
	  ;;
	7)
	  cns
	  ;;
	8)
	  absolute
	  ;;
	*)
	  echo " Please choose a valid option from the menu"
	  exit 1
esac

Νέο εργαλείο

Μετά από μερικά χρόνια χρειάστηκε να παρατήσω τον Γίγαντα (Giant Rock MTB) και να επιστρέψω σε μια σταθερή αξία της ελληνικής αγοράς. Ο λόγος για το νέο IDEAL PRORIDER, αν και μοντέλο του 2010, που μόλις μερικών ημερών φένεται να περνάει τις πρώτες δοκιμασίες επιτυχώς!

Simulation vs Emulation

Many times I can see these two different terms being used the other way around in articles. Simulation (προσομοίωση) is the process of modelling an event or process in a virtual environment. The model is aware that is being simulated and is different that the real one. It is used to represent the actual model/object. Emulation (εξομοίωση) on the other hand, is the process of creating the desired environment for an application, or an object in general, to act like being in the expected environment. For instance, a standard i386 Linux OS can be emulated on a i386 virtual machine that runs on PPC hardware. Emulation mimics what is excepted by the targeted object. The LHC can be simulated in a computer model. The first moments of the big bang will be emulated within the physical accelerator. Particles are not aware where they are physically.