• 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
  • Our Blog

    Ongoing observations by End Point Dev people

    Highlighting Search Pattern Matches in Vim

    Patrick Lewis

    By Patrick Lewis
    December 30, 2013

    Vim’s hlsearch option is a commonly-used way to enable visual feedback when searching for patterns in a Vim buffer. When highlighting of search matches is enabled (via :set hlsearch), Vim will add a colored background to all text matching the current search.

    Search highlighting is useful but it’s not obvious how to turn off the highlighting when you’re no longer concerned with the results of your last search. This is particularly true if you didn’t enable the hlsearch setting yourself but inherited it from a prebuilt package like Janus or copied someone else’s .vimrc file.

    One commonly-used way to clear the highlighting is to search for a garbage string by doing something like /asdfkj in normal mode. This method will clear the search highlights but has the undesired side effect of altering your search history.

    A better way to disable search highlighting temporarily is with the :nohlsearch command (which can be abbreviated to :noh). This will clear the highlights temporarily, but they’ll be turned back on the next time you perform a search. Also, you can use the n/N keys to resume your previous search, which isn’t possible if you use the above method of searching for a garbage …


    vim

    Developer Specific Configuration in Ruby on Rails

    Tim Case

    By Tim Case
    December 27, 2013

    Here’s a quick tip on how to set Rails configurations that you might want for yourself but not for the rest of the team.

    I find the default Rails log too noisy when I’m developing because it gives me more information than what I generally need. 90% of the time I only want to see what route is being hit for a request, what controller action responded to the route, and what parameters are being passed to the action. Finding this info with the default Rails log means wading through a jungle of SQL statements, and other things that I’m not interested in. Fortunately, Rails makes it easy to change log levels and the one I prefer is log level “info”.

    Setting this up however presents a new problem in that I recognize I’m deviating from what’s conventional in the Rails world and I only want this configuration for myself and not anyone else working on the project. The typical way to change the log level would be to add a line to the environments/development.rb:

    config.log_level = :info
    

    If I do this and then commit the change I’ve now forced my own eccentricities on everyone else. What I could do instead is simply not commit it but then I create noise in my git workflow by having this …


    rails

    Increasing MySQL 5.5 max_connections on RHEL 5

    Jon Jensen

    By Jon Jensen
    December 24, 2013

    Busy database-backed websites often hit scalability limits in the database first. In tuning MySQL, one of the first things to look at is the max_connections parameter, which is often too low. (Of course another thing to look at is appropriate fragment caching in your app server, HTTP object caching in your web server, and a CDN in front of it all.)

    When using MySQL 5.5 from Oracle’s RPMs through cPanel (MySQL55-server-5.5.32-1.cp1136) on RHEL 5.10 x86_64, there is an interesting problem if you try to increase the max_connections setting beyond 214 in /etc/my.cnf. It will silently be ignored, and the limit remains 214:

    mysql> show variables like 'max_connections';
    +-----------------+-------+
    | Variable_name   | Value |
    +-----------------+-------+
    | max_connections | 214   |
    +-----------------+-------+
    1 row in set (0.00 sec)
    

    The problem is that the maximum number of open files allowed is too small, by default 1024, to increase max_connections beyond 214.

    There are plenty of online guides that explain how to handle this, including increasing the kernel fs.file-max setting, which may be necessary by editing /etc/sysctl.conf, in this example to double the default: …


    database mysql redhat

    Building ImageMagick on RHEL/CentOS 6 with Perl 5.18.1

    Jon Jensen

    By Jon Jensen
    December 23, 2013

    This is a quick tip for anyone in the exact same situation I was recently, and everyone else can probably just skip it!

    RHEL 6 and CentOS 6 and other derivatives come with ImageMagick-6.5.4.7-6.el6_2.x86_64, which is a bit dated but still reasonable. They also come with Perl 5.10.1, which has grown very old. We wanted to use the latest version of Perl (5.18.1) with plenv, but the latest version of the Perl libraries for ImageMagick (PerlMagick) does not work with the older ImageMagick 6.5.4.7.

    The first task, then, was to locate the matching older version of PerlMagick from BackPAN, the archive of historical CPAN modules: http://backpan.perl.org/authors/id/J/JC/JCRISTY/PerlMagick-6.54.tar.gz, and try to build that.

    However, that fails to build without applying a patch to make it compatible with newer versions of Perl. The patch is available from http://trac.imagemagick.org/changeset?format=diff&new=4950, or you can just create a file called typemap in the root of the unpacked directory, with one line:

    Image::Magick T_PTROBJ
    

    Then build, test, and install as usual. That’s it.


    perl redhat

    Setting a server role in Salt (comparing Puppet and Salt)

    Spencer Christensen

    By Spencer Christensen
    December 23, 2013

    There are many ways to solve a given problem, and this is no truer than with configuration management. Salt (https://saltstack.com) is a fairly new tool in the configuration management arena joining the ranks of Puppet, Chef, and others. It has quickly gained and continues to grow in popularity, boasting its scalable architecture and speed. And so with multiple tools and multiple ways to use each tool, it can get a little tricky to know how best to solve your problem.

    Recently I’ve been working with a client to convert their configuration management from Puppet to Salt. This involved reviewing their Puppet configs and designs and more-or-less mapping them to the equivalent for Salt. Most features do convert pretty easily. However, we did run into something that didn’t at first/assigning a role to a server.

    We wanted to preserve the “feeling” of the configs where possible. In Puppet they had developed and used a convention for using some custom variables in their configs to assign an “environment” and a “role” for each server. These variables were assigned in the node and role manifests. But in Salt we struggled to find a similar way to do that, but here is what we learned.

    In …


    automation devops puppet salt

    Database federation performance showdown

    Josh Tolley

    By Josh Tolley
    December 19, 2013


    Flickr user garryknight

    The PostgreSQL Foreign Data Wrapper has gotten a fair bit of attention since its release in PostgreSQL version 9.3. Although it does much the same thing the dblink contrib module has long done, it is simpler to implement for most tasks and reuses the same foreign data wrapper infrastructure employed by several other contrib modules. It allows users to “federate” distinct PostgreSQL databases; that is, it allows them to work in combination as though they were one database. This topic of database federation has interested me for some time—​I wrote about it a couple years ago—​and when postgres_fdw came out I wanted to see how it compared to the solution I used back then.

    First, some background. The key sticking point of database federation that I’m focused on is transaction management. Transactions group a series of steps, so either they all complete in proper sequence, or none of them does. While lots of databases, and other technologies like messaging servers, can handle transactions that involve only one service (one database or one messaging server instance, for example), federation aims to allow transactions to span multiple services. If, for instance, …


    database java performance postgres

    End Point Partners with A-Zero to Expand Liquid Galaxy Services in South Korea

    Dave Jenkins

    By Dave Jenkins
    December 19, 2013

    End Point Corporation continues its global leadership for Liquid Galaxy development and professional services, and has signed a partnership agreement with A-Zero of South Korea to further expand those services for the display platform and its associated professional services.

    This partnership promises to be beneficial for the South Korean market. Already, A-Zero has lined up a number of engagements where the Liquid Galaxy could be deployed, bringing the incredible display platform together with the wealth of data resources in one of the most online-savvy countries in the world.

    “We look forward to great business opportunities with our new friends at End Point,” said Cho Hyungwan, Director of Business Development for A-Zero. “We can see many uses for the platform here in our market.” A-Zero is a systems integrator and software development company based in Seoul with skills in GIS data manipulation, complex system deployments, and close relations with Google Enterprise partners in the region.

    To kick-off this partnership, End Point brought a Liquid Galaxy Express to Seoul to show the platform at a nation-wide GIS conference together with A-Zero. The trade show was a great success, …


    clients visionport

    Use Ansible/Jinja2 templates to change file content based on target OS

    Emanuele “Lele” Calò

    By Emanuele “Lele” Calò
    December 19, 2013

    In the End Point hosting team we really love automating repetitive tasks, especially when it involves remembering many little details which can over time be forgotten, like differences of coreutils location between some versions of Ubuntu (Debian), CentOS (Red Hat) and OpenBSD variants.

    In our environment we bind the backup SSH user authorized_keys entry to a custom command in order to have it secured by being, among other aspects, tied to a specific rsync call.

    So in our case the content of our CentOS authorized_keys would be something like:

    command="/bin/nice -15 /usr/bin/rsync --server --daemon .",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAB3[...]Q== endpoint-backup
    

    Sadly that’s only true for CentOS systems so that if you want to automate the distribution of authorized_keys (as we’ll show in another post) to different Linux distributions (like Ubuntu) you may need to tweak it to comply to the new standard “/usr/bin” location, which will be eventually adopted by all new Linux versions overtime.. RHEL 7.x onward included.

    To do the OS version detection we decided to use an Ansible/Jinja2 template by placing the following line in the Ansible …


    devops ansible redhat debian linux ssh
    Previous page • Page 106 of 219 • Next page