Adding Ellipsis to Text Using CSS

In almost every blog these days, there is a listing page of blog posts with “Read more” or ellipsis (…) to show there is more content to be viewed. Many people will use backend languages, such as PHP and Ruby, to truncate the text before it gets to the browser. That is an effective technique that works well. However, if you want to be more responsive and allow the browser to be able to change how much text is shown depending on the screen width, you should use CSS to create these ellipsis. Continue reading

Persisting Guest Users in Rails with Devise

Some sites allow guest users to still interact with it. Kandid.ly allows you to like a photo, for example. CodePen and JSFiddle allow you to create pieces of code without having an account. Devise by default doesn’t have anything in it for having guest users on your site. Adding this functionality is not a difficult thing to do. Continue reading

User Friendships in Laravel

Facebook has friends. Twitter has followers. LinkedIn has connections. A staple of a social media site is the ability to let people connect with other user in some way. It’s not very social if people aren’t interacting. Adding this to a website isn’t that difficult. It just takes some thought into what that relationship looks like on a database level. Continue reading

Iterating Backwards Through A Ruby Array

This will be a quick one. I have seen alot of posts on StackOverflow about iterating backwards through a Ruby array. Ruby, in all its beauty, gives quite a few ways to iterate through an array. Continue reading

Create an Admin Interface in Laravel

Nowadays, you’d be hard-pressed to find a PHP developer who doesn’t know about Laravel. If you are one of these people, visit the Laravel site ASAP! The framework is insanely popular in the PHP community these days because of the thought that has gone into it to make it easy to use and robust as hell! We will demonstrate its easy-of-use by building an admin interface that we can use to manage our users in some fake application we have already built. Continue reading

Querying by Custom Fields in WordPress

Sometimes, we want to query the WordPress database for all of a post type based on some custom fields we have set. WordPress makes it easy to do. However, the syntax can be kind of cryptic due to its usage of multidimensional arrays. Hopefully, I can help clear it up for you a bit. Continue reading