Early Literature and Scripture Search App – Update

As an update I would like to re-demo the command line version of the versepress app engine. The most notable difference from older pre-beta versions is the fact that one can supply logic to the search. Below is an example using the King James English Bible.

$ ruby versepress.rb "melchi(zedek|sedec)" 
        Genesis  14:18                             And [Melchizedek] king of Salem brought fort...
         Psalms 110:4    ...or ever after the order of [Melchizedek].
        Hebrews   5:6    ...or ever after the order of [Melchisedec].
        Hebrews   5:10   ....priest after the order of [Melchisedec].
        Hebrews   6:20   ...or ever after the order of [Melchisedec].
        Hebrews   7:1                         For this [Melchisedec], king of Salem, priest of....
        Hebrews   7:10   ....loins of his father, when [Melchisedec] met him.
        Hebrews   7:11   ...ld rise after the order of [Melchisedec], and not be called after t...
        Hebrews   7:15   ...at after the similitude of [Melchisedec] there ariseth another priest,
        Hebrews   7:17   ...or ever after the order of [Melchisedec].
        Hebrews   7:21   ...or ever after the order of [Melchisedec]:)

The versepress.com web app currently has only a King James English Bible. But other works are in development. The following is a preview of the searchable SBLGNT (Society of Biblical Literature’s Greek New Testament) :

$ ruby versepress.rb "λέγω(σιν|ν)--pl" koine
         Romans   2:22                               ὁ [λέγων] μὴ μοιχεύειν μοιχεύεις; ὁ....
  Corinthians 1  11:25   ...οτήριον μετὰ τὸ δειπνῆσαι, [λέγων]· Τοῦτο τὸ ποτήριον ἡ καινὴ...
Thessalonians 1   5:3                             ὅταν [λέγωσιν]· Εἰρήνη καὶ ἀσφάλεια, τότε...
        Hebrews   2:6          διεμαρτύρατο δέ πού τις [λέγων]· Τί ἐστιν ἄνθρωπος ὅτι μιμ...
        Hebrews   2:12                                 [λέγων]· Ἀπαγγελῶ τὸ ὄνομά σου τοῖ...
        Hebrews   4:7    ....ἡμέραν, Σήμερον, ἐν Δαυὶδ [λέγων] μετὰ τοσοῦτον χρόνον, καθὼ...
        Hebrews   6:14                                 [λέγων]· Εἰ μὴν εὐλογῶν εὐλογήσω σ...
        Hebrews   8:11   ...ἕκαστος τὸν ἀδελφὸν αὐτοῦ, [λέγων]· Γνῶθι τὸν κύριον, ὅτι πάν...
        Hebrews   9:20                                 [λέγων]· Τοῦτο τὸ αἷμα τῆς διαθήκη...
        Hebrews  10:8                         ἀνώτερον [λέγων] ὅτι Θυσίας καὶ προσφορὰς κ...
        Hebrews  12:26   ...εν τότε, νῦν δὲ ἐπήγγελται [λέγων]· Ἔτι ἅπαξ ἐγὼ σείσω οὐ μόν...
           Acts   1:3    ...ντα ὀπτανόμενος αὐτοῖς καὶ [λέγων] τὰ περὶ τῆς βασιλείας τοῦ....
           Acts   2:40   ...ρατο, καὶ παρεκάλει αὐτοὺς [λέγων]· Σώθητε ἀπὸ τῆς γενεᾶς τῆς...
           Acts   3:25   ...ὸς πρὸς τοὺς πατέρας ὑμῶν, [λέγων] πρὸς Ἀβραάμ Καὶ ἐν τῷ σπέρ...
           Acts   5:28                                 [λέγων]· Παραγγελίᾳ παρηγγείλαμεν....
           Acts   5:36   ....τῶν ἡμερῶν ἀνέστη Θευδᾶς, [λέγων] εἶναί τινα ἑαυτόν, ᾧ προσε...
           Acts   8:9    ...ων τὸ ἔθνος τῆς Σαμαρείας, [λέγων] εἶναί τινα ἑαυτὸν μέγαν,
           Acts   8:19                                 [λέγων]· Δότε κἀμοὶ τὴν ἐξουσίαν τ...
           Acts   8:26   ...ίου ἐλάλησεν πρὸς Φίλιππον [λέγων]· Ἀνάστηθι καὶ πορεύου κατὰ...
           Acts  10:26       ὁ δὲ Πέτρος ἤγειρεν αὐτὸν [λέγων]· Ἀνάστηθι· καὶ ἐγὼ αὐτὸς ἄ...
           Acts  11:4    ...ς ἐξετίθετο αὐτοῖς καθεξῆς [λέγων]·
           Acts  12:7    ...ν τοῦ Πέτρου ἤγειρεν αὐτὸν [λέγων]· Ἀνάστα ἐν τάχει· καὶ ἐξέπ...
           Acts  15:13   ...αι αὐτοὺς ἀπεκρίθη Ἰάκωβος [λέγων]· Ἄνδρες ἀδελφοί, ἀκούσατέ....
           Acts  16:9    ...ὼς καὶ παρακαλῶν αὐτὸν καὶ [λέγων]· Διαβὰς εἰς Μακεδονίαν βοή...
           Acts  16:28   ...εν δὲ φωνῇ μεγάλῃ ὁ Παῦλος [λέγων]· Μηδὲν πράξῃς σεαυτῷ κακόν...
           Acts  19:4    ...βάπτισμα μετανοίας, τῷ λαῷ [λέγων] εἰς τὸν ἐρχόμενον μετ’ αὐτ...
           Acts  19:26   ...ς μετέστησεν ἱκανὸν ὄχλον, [λέγων] ὅτι οὐκ εἰσὶν θεοὶ οἱ διὰ....
           Acts  21:21   ....τὰ ἔθνη πάντας Ἰουδαίους, [λέγων] μὴ περιτέμνειν αὐτοὺς τὰ τ...
           Acts  21:40   ...ώνησεν τῇ Ἑβραΐδι διαλέκτῳ [λέγων]
           Acts  22:26   ...θὼν τῷ χιλιάρχῳ ἀπήγγειλεν [λέγων]· Τί μέλλεις ποιεῖν; ὁ γὰρ....
           Acts  24:2    ...ατο κατηγορεῖν ὁ Τέρτυλλος [λέγων]· Πολλῆς εἰρήνης τυγχάνοντε...
           Acts  25:14   ...ἀνέθετο τὰ κατὰ τὸν Παῦλον [λέγων]· Ἀνήρ τίς ἐστιν καταλελειμ...
           Acts  26:22   ...τε καὶ μεγάλῳ, οὐδὲν ἐκτὸς [λέγων] ὧν τε οἱ προφῆται ἐλάλησαν...
           Acts  27:10                                 [λέγων] αὐτοῖς· Ἄνδρες, θεωρῶ ὅτι....
           Acts  27:24                                 [λέγων]· Μὴ φοβοῦ, Παῦλε· Καίσαρί....
           Acts  27:33   ....ἅπαντας μεταλαβεῖν τροφῆς [λέγων]· Τεσσαρεσκαιδεκάτην σήμερο...
           Acts  28:26                                 [λέγων]· Πορεύθητι πρὸς τὸν λαὸν τ...

Another interesting feature in relation to such documents is the standard “tagging” scheme. The versepress tagging feature is due to finish testing very soon. I’ll post a tag demo in the near future.

WordPress Shopping Cart: View All Feature

The feature we want to implement is a link label “view all” that behaves in the same way http://www.sundancecataloge.com product page behaves.

The improvement will make it possible to display all the products of one category (or of all categories) in the same page where it usually is paginated.

There are at least two approaches:
1. hide the regular display of products with pagination and display all products
2. work on modifying the actual display of products function with pagination and tweak it so that it would receive a parameter acted by a form button “view all”

We solved with #2:

We modify the logic for the product queries. After some hard work I have come up with a solution that can be seen in action here


If you would like to get the patch for this feature it is available if you email me at cordoval@gmail.com with a donation of $17.

Your contribution will be used to develop more amazing improvements to the Shopping cart and I will post them on this blog.

Please encourage me to keep developing more patches for WPEC here: Donate HERE
Thanks!

Managing Code Development 1

An interesting problem arose today. After spending time evaluating a solution for a client, I developed and modified a branch of a base code called “beautify_variations”. The master branch is of course “master” and it is not only the master but the code base. If I were to take another client asking for another feature for a custom specials widget then I can develop a branch called “custom_specials_widget”.

The Code Base

The base code “master” branch is very important. In order to troubleshoot for clients I need to have a code base which is default, which is easy to configure, bare minimum, and capable of reproducing all standard features without problems of conflicts with other pieces of code and so on so forth. My master branch does all of that. And to start with a new client I only issue:

[code]git branch[/code]

Which will list all my branches and the branch that I am currently in. And then:

[code]git checkout master[/code]

This will set me back to 0 default to an environment that I can trust and start developing with more confidence than before knowing that everything is saved automatically and I can pickup work anytime from anywhere again.

Being able to do this switching with one command line is just what a developer needed the most. One with several requests from clients of course.

The Construction of Solutions

If a client request a type of customization that is on my archives but it requires some extra modifications there should be a way that I can take the code base, apply the customizations from the archive and then merge all of that with my new customizations. All the more, one would like to set this new code solution as a client custom branch. Can I do this? Yes! We will see this in more detail in the future, I will add in this post my experiential findings.

Deployment Scenarios: Patches

Deployment usually conveys the idea of a far repository or server. This is important since we cannot know all the details of the remote server to where we are deploying our improvements to the code. A deliverable therefore needs to be precise as to what part of the code is changing and we would like to streamline the process through the use of patches. A patch, in this scenario, becomes a diff between a common code base and my improvements. How to automatically run it or have it run by someone else is an important part of delivering patches. We must use patches and “unpatches” in case we negatively impact the code base and can quickly undo our patching.

Deployment Scenarios: Upgrades

From time to time the code base is upgraded to a new version. This creates earth movements that threaten my code base’s stability. They can or cannot introduce new bugs, they can fire up old bugs and can create a lot of confusion with new features conflicting with my old changes. The whole archive of customizations needs to be well documented and specify for which version of the code base the custom code was developed. The new code is public ideally, so one can do merges and update with time since all the information is available to us.

The use of submodules can help this process of upgrading code bases, however, when the customizations are made to the code base we require a quick and systematic way of doing this upgrades. Any takers?

Develop for Windows Explorer Browsers from Ubuntu (with VirtualBox)

Lately I wanted to setup my ubuntu box with virtualbox so I can also run windows and mainly to be able to test on windows the look of some of the sites I develop. In order to do that I could choose to put up a site online to a live server somewhere. Although this is feasible for me since I have a special setting with my hosting, dropbox fix, and unlimited space and subdomains, I think it would be too much to be updating files on a far server just for a rapid change. Therefore I decided to have the virtual windows to be able to load pages from my host ubuntu apache2 server which was all along configured.

I found THIS post but it did the inverse. The guys from windows trying to develop sites on ubuntu. That is not what we want! Rather we want to just check our sites we develop on native ubuntu into the nightmare of Internet Explorer’s versions. Yes if you are reading this encourage your users not to use any of those browsers. And that is not changing in the latest beta or whatever version. It will just not change.

Going to the meat you want to have handy these details:

[code]
# ifconfig (to look for your IP in your ubuntu host)
[/code]

[code]
cat /etc/resolv.conf (your ubuntu host DNS)
[/code]

On the windows guest set a fixed IP (e.g. as in the image) and a DNS (same as ubuntu host)

Under Devices on your windows guest virtuabox window on Network Adapters have it this way:

Finally, on your windows guest you should set the domains your developer sites are being served by your ubuntu host apache2 setup.

For instance if I am serving a site as http://ward.local on ubuntu then I have to go into my windows guest and go under C:/Windows/System32/Drivers/etc/hosts and add the entry like this:

Using the IP I got from my ubuntu host with:
[code]
# ifconfig (to look for your IP in your ubuntu host)
[/code]

I enter:
[code]
127.0.0.1 localhost (this line is already there)
XXX.XX.XX.XX ward.local (this is the new line)
[/code]

Of course don’t enter the lines with parenthesis.

Now you should be able to enjoy seeing your sites on windows iexplorer browsers.

Helping you? Please encourage me with a donation: http://bit.ly/donateforhelp
I am a freelancer and don’t work for any company. By donating you will be helping me to help others as yourself.
Need help with your site? Conact me at http://bit.ly/contactasap