• Home

  • Custom Ecommerce
  • Application Development
  • Database Consulting
  • Cloud Hosting
  • Systems Integration
  • Legacy Business Systems
  • Security & Compliance
  • GIS

  • Expertise

  • About Us
  • Our Team
  • Clients
  • Blog
  • Careers

  • VisionPort

  • Contact
  • Bonked By Basic_auth Because Bcrypt

    Greg Sabino Mullane

    By Greg Sabino Mullane
    February 9, 2016

    TL;DR: Don’t use a high bcrypt cost with HTTP basic auth!

    Recently we had a client approach us with reports of a slow wiki experience. This was for a MediaWiki we recently installed for them; there were no fancy extensions, and the hardware, the OS, and the Apache web server were solid, perfectly normal choices. I was tasked to dive in and solve this issue.

    The first step in any troubleshooting is to verify and duplicate the problem. While the wiki did feel a bit sluggish, it was not as bad as the reports we were getting of taking over 15 seconds to view a page. A side-by-side comparison with a similar wiki seemed a good place to start. I called up the main wiki page on both the client wiki and End Point’s internal wiki. Both were running the latest version of MediaWiki, had the same type of servers (located a similar distance from me), were using the same version of Apache, and had roughly the same server load. While both wiki’s pages had roughly the same amount of content, the client one loaded noticeably slower. It took less than a second for the End Point wiki, and around ten seconds for the client one!

    The first possible culprit was …


    apache bcrypt mediawiki performance security sysadmin

    Zurb Foundation 5: Applying Styles Conditionally Based on Viewport Size

    Patrick Lewis

    By Patrick Lewis
    February 8, 2016

    The Zurb Foundation 5 front-end framework provides many convenient features such as the ability to control the visibility of HTML elements for different browser window sizes using CSS classes. Foundation CSS classes like “show-for-small-only” and “hide-for-large-up” (full list at https://get.foundation/sites/docs-v5/components/visibility.html) make it easy to add mobile-specific content to your page or prevent certain page elements from being displayed on mobile devices.

    Having an easy way to show/hide elements based on viewport size is nice, but what if you want to style an element differently based on the size of the browser that’s viewing the page? Foundation has you covered there, too, though the method is less obvious. It’s possible to use Foundation’s media query SCSS variables when writing your own custom styles in order to apply different styling rules for different viewport sizes.

    For example, if you have an element that you want to offset with a margin in a large window but be flush with the left edge of a small window, you can use the Foundation media query variables to apply a styling override that’s specific to small windows:

    #element {
        margin-left: 100px; …

    css mobile

    Postgres 9.5: three little things

    Greg Sabino Mullane

    By Greg Sabino Mullane
    January 28, 2016

    The recent release of Postgres 9.5 has many people excited about the big new features such as UPSERT (docs) and row-level security (docs). Today I would like to celebrate three of the smaller features that I love about this release.

    Before jumping into my list, I’d like to thank everyone who contributes to Postgres. I did some quick analysis and found that 85 people, from Adrien to Zeus, have helped version 9.5 of Postgres, at least according to the git logs. Of course, that number is actually higher, as it doesn’t take into account people helping out on the #postgresql channel, running buildfarm animals, doing packaging work, keeping the infrastructure running, etc. Thanks to you all!

    Feature: REINDEX VERBOSE

    The first feature is one I’ve been wishing for a long time—​a verbose form of the REINDEX command. Thanks to Sawada Masahiko for adding this. Similar to VACUUM, REINDEX gets kicked off and then gives no progress or information until it finishes. While VACUUM has long had the VERBOSE option to get around this, REINDEX gives you no clue to which index it was working on, or how much work each index took to rebuild. Here is a normal reindex, along …


    database postgres

    Improve SEO URLs for Interchange search pages

    Jeff Boes

    By Jeff Boes
    January 27, 2016

    This is an article aimed at beginner-to-intermediate Interchange developers.

    A typical approach to a hierarchical Interchange site is:

    Categories -> Category -> Product

    I.e., you list all your categories as links, each of which opens up a search results page filtering the products by category, with links to the individual product pages via the flypage.

    Recently I upgraded a site so the category URLs were a bit more SEO-friendly. The original category filtering search produced these lovely specimens:

    /search.html?fi=products&st=db&co=1&sf=category&se=Shoes&op=rm
       &sf=inactive&se=yes&op=ne&tf=category&ml=100

    but what I really wanted was:

    /cat/Shoes.html

    Such links are easier to communicate to users, more friendly to search engines, less prone to breakage (e.g., by getting word-wrapped in email clients), and avoid exposing details of your application (here, we’ve had to admit publicly that we have a table called “products” and that some items are “inactive”; a curious user might decide to see what happens if they change “sf=inactive&se=yes” to some other expression).

    Here’s how I attacked this.

    Creating a category …


    interchange seo

    Full Screen Gallery with Supersized and video slides

    Marina Lohova

    By Marina Lohova
    January 26, 2016

    I was recently looking to build a full screen image and video gallery for our client Mission Blue. Something similar to the Google Maps interface you can see in the screenshot below:

    After scouring the Internet to find a suitable jQuery plugin I finally decided on Supersized, Full screen background slideshow plugin for jQuery.

    After downloading the library, include it on the page:

    <link href="/wp-content/plugins/wp-supersized/theme/supersized.shutter.css?ver=4.2.2" id="supersized_theme_css-css" media="all" rel="stylesheet" type="text/css"></link>
    <script src="/wp-includes/js/jquery/ui/effect.min.js?ver=1.11.4" type="text/javascript"></script>
    <script src="/wp-content/plugins/wp-supersized/js/jquery.easing.min.js?ver=1.3" type="text/javascript"></script>
    <script src="/wp-content/plugins/wp-supersized/js/jquery.easing.compatibility.js?ver=1.0" type="text/javascript"></script>
    <script src="/wp-content/plugins/wp-supersized/js/jquery.animate-enhanced.min.js?ver=0.75" type="text/javascript"></script>
    < …

    css design html javascript jquery extensions video wordpress

    Medium-inspired Parallax Blur Effect For WordPress

    Marina Lohova

    By Marina Lohova
    January 22, 2016

    Are you are running a WordPress blog, but secretly dying to have that Medium parallax blur effect? I recently implemented this, and would like to share it with you. By the way, while I was working on the article, the effect was removed from Medium, which only makes having one on the website more precious.

    Let’s assume that we have our custom theme class MyTheme. In functions.php:

    class MyThemeBaseFunctions {
      public function __construct() {
        add_image_size('blurred', 1600, 1280, true);
        add_filter('wp_generate_attachment_metadata', array($this,'wp_blur_attachment_filter'));
      }
    }

    We added a custom image size blurred, and a callback wp_blur_attachment_filter to wp_generate_attachment_metadata. Here’s where the magic happens.

    Before that let’s talk a little about ImageMagick, a powerful library for image processing that we will use to create the blurred effect. After some experimenting I figured that the image needed to be darkened, and then a regular blur should be applied with sigma=20. You can read more about these settings at ImageMagick Blur Usage. I used Gaussian Blur at first, but found the processing was extremely slow, and there wasn’t much …


    imagemagick php user-interface wordpress

    Breaking Bash

    Jeff Boes

    By Jeff Boes
    January 15, 2016

    Recently I managed to break the bash shell in an interesting and puzzling way. The initial symptoms were very frustrating: a workflow process we use here (creating a development camp) failed for me, but for no one else. That was at least a clue that it was me, not the workflow process.

    Eventually, I narrowed down the culprit to the “grep” command (and that was more through luck than steadfast Sherlock-like detective work).

    $ grep foo bar
    
    grep: foo: No such file or directory

    Eh? grep is misparsing the arguments! How does that happen?

    So I began to study my bash environment. Eventually I came up with this fascinating little typo:

    export GREP_OPTIONS='-color=auto'

    That’s supposed to be:

    export GREP_OPTIONS='--color=auto'

    but it got recorded in my .bashrc as a em-dash, not a double-dash. (My guess is that I cut-and-pasted this from a web page where someone over-helpfully “typeset” this command.)

    Ironically, this typo is innocuous under Bash 3.x, but when you slot it into a Bash 4.x installation, all heck busts loose.


    shell

    PostgreSQL Point-in-time Recovery: An Unexpected Journey

    David Christensen

    By David Christensen
    January 15, 2016

    With all the major changes and improvements to PostgreSQL’s native replication system through the last few major releases, it’s easy to forget that there can be benefits to having some of the tried-and-true functionalities from older PostgreSQL versions in place.

    In particular, with the ease of setting up hot standby/​streaming replication, it’s easy to get replication going with almost no effort. Replication is great for redundancy, scaling, and backups. However, it does not solve all potential data-loss problems. For best results it should be used in conjunction with Point-in-time Recovery (PITR) and the archiving features of PostgreSQL.

    Background

    We recently had a client experience a classic blunder with their database, namely, that of performing a manual UPDATE of the database without wrapping it in a transaction block and validating the changes before committing. The table in question was the main table in the application, and the client had done an unqualified UPDATE, unintentionally setting a specific field to a constant value instead of targetting the specific row they thought they were going for.

    Fortunately, the client had backups. Unfortunately the backups themselves …


    database postgres replication disaster-recovery
    Previous page • Page 73 of 223 • Next page