Monday, August 3, 2015

Introduction to Elasticsearch in PHP

In this tutorial, we’re going to take a look at Elasticsearch and how we can use it in PHP. Elasticsearch is an open-source search server based on Apache Lucene. We can use it to perform super fast full-text and other complex searches. It also includes a REST API which allows us to easily issue requests for creating, deleting, updating and retrieving of data.

ElasticSearch Logo

Installing Elasticsearch

To install Elasticsearch we first need to install Java. By default, it is not available in the repositories that Ubuntu uses so we need to add one.

sudo add-apt-repository ppa:webupd8team/java

Next, we execute the following to update the sources.

sudo apt-get update

Once that’s done, we can install Java.

sudo apt-get install oracle-java8-installer

Next, let’s download Elasticsearch using wget.

wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.2.tar.gz

Currently, the most recent stable version is 1.5.2 so that is what we used above. If you want to make sure you get the most recent version, take a look at the Elasticsearch downloads page.

Then, we extract and install.

mkdir es
tar -xf elasticsearch-1.5.2.tar.gz -C es
cd es
./bin/elasticsearch

When we access http://localhost:9200 in the browser, we get something similar to the following:

{
  "status" : 200,
  "name" : "Rumiko Fujikawa",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.5.2",
    "build_hash" : "62ff9868b4c8a0c45860bebb259e21980778ab1c",
    "build_timestamp" : "2015-04-27T09:21:06Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}

Continue reading %Introduction to Elasticsearch in PHP%


by Wern Ancheta via SitePoint

Introducing Theme Juice for Local WordPress Development

Like most WordPress developers, I used MAMP for local development environments. MAMP works well for some people, but it doesn’t really allow you to create reproducible development environments. Your environment is really at the will of both MAMP itself (i.e. your settings), as well as which operating system you’re developing on; and that’s really not a good thing.

After awhile, the MAMP workflow isn’t all that it’s cracked up to be, especially once you begin needing to share environments between team members. Suffice it to say, we left the MAMP workflow behind once we were introduced to the ubiquitous Vagrant. I won’t get into the details of that affair, because there’s already a great article written on that happening to somebody else. But how do you ease yourself into Vagrant, when you’re so used to your beloved MAMP workflow?

Enter, Theme Juice (or tj), a command line utility for modern WordPress development. It takes the pain out of local development by taking advantage of Vagrant and an Apache fork of VVV called VVV-Apache as the virtual machine. It allows you to generate an unlimited number of local development projects, manage their dependencies, and even handles deploying them, all from the command line.

Requirements

This project requires Vagrant and VirtualBox to be able to create virtual machines for local development. Please download and install both of these before following along with this article.

Continue reading %Introducing Theme Juice for Local WordPress Development%


by Ezekiel Gabrielse via SitePoint

Picr

Picr – new era for Photographers

Launching soon page for new startup 'Picr' that helps (potential) clients find and book sessions with you, the photographer. Really like this style of team picture - enthusiastic, colorful and fun.

by Rob Hope via One Page Love

Blackbox

opl-small

Launching soon page for 'Blackbox' - a new startup from the creators of Cards Against Humanity. The One Pager features an animated 3D canvas sphere on what seems like a low poly wireframe. The 3D effect is achieved with three.js.

by Rob Hope via One Page Love

Why You Should Use Neo4j in Your Next Ruby App

I have needed to store a lot of data in my time and I've used a lot of the big contenders: PostgreSQL, MySQL, SQLite, Redis, and MongoDB. While I've built up extensive experience with these tools, I wouldn't say that any of them have ever made the task fun. I fell in love with Ruby because it was fun and because it let me do more powerful things by not getting in my way. While I didn't realize it, the usual suspects of data persistence were getting in my way. But I've found a new love: let me tell you about Neo4j.

What is Neo4j?

Neo4j is a graph database! That means that it is optimized for managing and querying connections (relationships) between entities (nodes) as opposed to something like a relational database which uses tables.

Why is this great? Imagine a world with no foreign keys. Each entity in your database can have many relationships referring directly to other entities. If you want to explore the relationships there are no table or index scans, just a few connections to follow. This matches up well with the typical object model. It is more powerful, though, because Neo4j, while providing a lot of the database functionality that we expect, gives us tools to query for complex patterns in our data.

Continue reading %Why You Should Use Neo4j in Your Next Ruby App%


by Brian Underwood via SitePoint

Introduction to OwnCloud Server: File Sharing Under Your Control

Sponge Digital & Design US

Sponge Digital & Design US

Promotional landing page for the US division of creative bureau 'Sponge & Digital Design'. The One Pager features impressive intro slideshow background animations as well as a dark scheme with good contrast.

by Rob Hope via One Page Love