Testing a Service Worker with a Self-Signed SSL Certificate in Google Chrome

For local development I use the default snake-oil certification which is self-signed. Chrome will throw an error and not load the service worker when this certification is encountered. In Ubuntu you can start Chrome from the command-line using the following arguments. --ignore-certificate-errors -...

Missing Sound Indicator in Ubuntu 16.04

After reinstalling Alsa due to some mic issues I lost my sound indicator from the Unity service panel. After a bit of Googling I was finally able to piece together the right steps. This post has all the pieces but the selected answer did not work for my situation. The following steps are what worke...

The volume "boot" has only 0 bytes disk space remaining

I'm running Ubuntu 16.04 and on my last few boots I have recieved a Low Disk Space message. I brought up my system monitor and saw that my /boot directory /dev/sda1 was full. Clicking into the drive revealed a list of unused kernels.1 That is about 400MB worth of unused kernels on a 500MB...

Using Logcat with Cordova

I've been using Cordova to build an Android app. Since Cordova's focus is on using web technologies to build mobile I'm expecting similar debugging tools, especially in the console. The first step is to add the cordova-plugin-console this returns web console messages to the debugger. Now all I hav...

Tour of Heroes in Production with HashLocationStrategy

I decided it was time to learn Angular 2 so I figured I would start with the Tour of Heroes turotial. While Angular 2 is a drastic change from Angular 1 it is still familiar enough as not to be completely foreign. I recommend skipping the quickstart package and starting with Angular CLI. If you are ...

Move Data From MySQL to MongoDB via phpMyAdmin and Mongoimport

I decided to migrate from a classic LAMP stack to a MEAN stack and I need to migrate my blog from MySQL to MongoDB. MongoDB has a tool called mongoimport which accepts a few types of data. Now all I have to do is export my data to the right format. I recalled phpMyAdmin having an export to JSON opti...

PHP-INTL on Ubuntu for CakePHP 3 and PHP 7

I opted for CakePHP version 3 for a new project I am working on. Before starting the project I thought I would play around with the framework a bit. I chose Composer as the installation method. I ran the following command build a project called ctest. composer create-project --prefer-dist cakephp/a...

Local Analysis with Code Climate via Docker on Ubuntu 16.04

I began working with Code Climate, which is also the first time I have worked with docker. I am using Ubuntu 16.04, and I followed the Docker install guide. After install, nothing would run. I soon realized I needed to sudo everything involving Docker The Code Climate README file is pretty straight...

Fixing Chrome Apt Errors on Debian/Ubuntu (Failed to fetch http://dl.google.com/linux...)

While running a typical update on Ubuntu 14.04 I ran into the following error relating to Chrome. W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file) The f...

phpMyAdmin Showing Dropped Tables

I had deleted several tables from a MySQL database but when I opened phpMyAdmin, those tables were still showing under the structure tab. These tables would not appear in the side nave nor were they accessible. The structure view simply refused to let go of those tables. I ran the following query an...

Clock Disappears in Ubuntu 14.04

Every now and again my panel clock goes missing on Ubuntu 14.04. While a reboot always solves the issue that is not always practical. Rather than diving into forums and man pages every time this happens; I thought I would just make a note of the quickest fix. From a command prompt sudo killall unity...

How do I call an element from a helper in CakePHP 2.x?

In CakePHP both helpers and elements are great ways to reuse code at the view level. I tend to use helpers more for OO style functionality and elements more for reusable chunks of HTML. In this case I have a stack of elements with a common wrapper (provided by the helper) and wanted pass the desired...

Selecting Random Rows in MySQL

At the time of this writing I have implemented a tile based home page. I populate a number of these tiles by pulling random blog posts. I was a little shocked when it occurred to me I have never had a reason to retrieve random data. I hashed out a few solutions in my head, but they seemed a little l...

Net Neutrality an Honest Debate

I've been leaning towards the side of the Net Neutrality people for quite some time now. This is mostly because I haven't heard anything from the big ISPs other than a bunch of PR rhetoric. Security Now episode 457 finally has an honest debate between a content provider and an ISP. What makes this d...

Random Configuration Strings for CakePHP

Provides psuedo-random strings that are suitable for the cipher and salt values in CakePHP's core.php file....

Installing Xdebug on Ubuntu 14.04

Xdebug is code profiling tool for PHP. As such, it is a good addition to PHPUnit. I do a lot of work with CakePHP and CakePHP's built-in test suite makes use of both of these. Install requirements for Xdebug vary from system to system and have changed over the years. Since I'm using Ubuntu 14.04 I t...

Ubuntu 14.04, CakePHP 2.4 and PHPUnit 3.7

I've been in the process of migrating all of my servers from Ubuntu 12.04 over to Ubuntu 14.04. For this process, I'll usually install the OS on a VM (virtual machine) and document my build of the LAMP (Linux, Apache, MySQL, PHP) stack. Once I am satisfied I have worked out most of the details for g...

Saving Files with Vim

Vim can be kind of tricky your first few times using it. Knowing how to save and abort your changes along with being able to exit the editor is a great place to start. :w writes changes and keeps the file open. :x writes changes and closes the editor. :quit! aborts changes and closes the editor. :w ...

NSA Proof Your Apache Configuration

Between Heartbleed (CVE-2014-0160) and Edward Snowden the last eleven moths have created quite a stir in realm of Information Security; especially when it comes to SSL. In the wake of Heartbleed I thought I would share my Apache configuration and provide some tips on preventing Heartbleed as well as...

Certificate Signing Request (CSR) on Linux

This is a quick overview of how I create CSRs for obtaining SSL certificates. Create a directory for storing your SSL assets. cd /etc/apache2 && mkdir ssl && cd ssl Create a private key. openssl genrsa -out jasonsnider.com.key 2048 Create a signing request. openssl req -new -key jaso...

End of Life for Ubuntu One

I just received an email from the Ubuntu One team stating the Ubuntu One service will no longer be available as of June 1st, 2014. Here is the offical announcement, a copy of the email is attached below Hi, We are writing to you to notify you that we will be shutting down the Ubuntu One file service...

Testing GitHub

I'm a huge fan of GitHub but it is not with out it's problems. The following when anytime a push, pull, clone, etc fails it's usually because I'm logged in as the wrong user or GitHub is down. The following provide two quick tests to help figure out where the issue is. Start by checking your ability...

My Standard Implementation for TinyMCE

These are my default tinymce.init({}) settings for TinyMCE. Below you'll find my explanation for each of these settings. selector When building a new web application I like to treat .editor as a reserved word in css. Once I have set my selector any textarea with the .editor class will pickup the tex...

Gotchas in Shell Scripting

Shell scripting can be a little frustrating at times, I'm sharing some my gotchas to hopefully serve me as a reminder and help to help anyone else who may have gotten themselves stuck. bash isn't sh If your writing a shell script always be explicit about the shell you wish to call. The first line of...

Separation of Dev and Production Environments

As a rule developers. programmers and admins tend to be lazy, this is why we have concepts such as shell scripts, crontabs and of course write once, run anywhere. In this case I want to write once but not run anywhere. The condition for not runnning is a determination as to whether or not we want to...

The Wrong Power Supply

I ran across this tweet and decided share some old knowledge about the subject. @codinghorror Overheard in computer store "will the 65W power supply instead of 95W slow down the laptop or decrease the screen resolution" chx (@chx) January 11, 2014 If your device ships with a 95W power supply and yo...

Find Duplicate Data in a MySQL Database

Here is a handy little query for finding duplicate data in a MySQL data base. This can be useful for finding duplicate data, creating a leaderboard, a top ten list, etc. My original use case was to assist in de-duping some large database tables. SELECT count(some_column), some_column FROM some_table...

Shutter a Great Linux Alternative to Snagit

Snagit is a great WIndows tools for creating and working with screenshots, sadly they do not make a Linux version. Thankfully I found the Shutter Screenshot Tool. The Shutter Project delivers a lot of great tools for managing screenshots. http://shutter-project.org/ Installation on Ubuntu Linux is s...

Sort Directory Contents From the Command Line in Linux

I was trying to make since of some apache error logs and was trying to find latest files. Typically I would just use ls -l (to list all of the files in long format) and find the file that comes closest to matching the estimated time of the error, in this case I'm on a development machine which tend ...

What I Use

I get a lot of questions asking me what I use and/or recommend in the technology realm, so I thought I would take some time and answer that question here. I'll lead in by saying I'm not a gammer, so if you're looking for a gaming-machine this is not the article you are looking for. Laptop Dell XPS ...

Simple Cloud Hosting with DigitalOcean

I don't click on a lot of ads, but when I see an ad that says Ubuntu Servers starting at $5.00 per month. I feel compelled to hear them out. The service is called DigitalOcean and it is awesome. So awesome in fact, I've just migrated jasonsnider.com over from Rackspace. After nearly 24 hours on Digi...

Introducing JAM

Jason's Asset Manager (JAM) is shell script for combining and minifing a website's front end assets. Essentially, JAM is a configuration manager for YUI Compressor. It works by passing the name of a configuration file as a command line argument when calling JAM. The configuration file has three set...

A Few Words on Shell Scripts

I've had some questions about shell scripts here of late and I thought I would take some time to share my thoughts on the notion of shell scripts. Based on the questions I have received I will based this article around shell scripts and cron jobs; how I set them up and when I tend to use them. Shell...

Install node.js

I just started playing around with node.js and wanted to write up a quick tutorial on running node.js on an Ubuntu Linux machine. While I wrote this specifically for Ubuntu, it should work with most Linux versions. I'm assuming you have installed git. If not you should be able run the install us...

Move a Column in MySQL

Every now and again I'll go into clean up mode and start cleaning up my database tables. One of the things I like to do is put my columns in some kind of a logical order. I can never remember the command for doing so. As a result I'm leaving a little reminder as to how to rearrange the columns in a ...

Creating a Self-Signed SSL Certificate on Ubuntu

This article will walk you through installing self-signed certificate. Self-signed certificates are great for testing your applications SSL dependiencies in yout development environment. For a production site, replace the self signing directions with the directions supplied to you by your SSL vendor...

Building A Lamp Stack On Ubuntu

Installing the LAMP stack (Linux, Apache, MySQL, PHP) is extremely simple in Ubuntu. This article will guide you through building a LAMP server for both development and production environments. I'm assuming Ubuntu Server for production, this means this article will be focused on the command line. A ...

Building an Ubuntu Linux Development Environment

This is the documentation for one of my current development environments. This development environment is geared towards full-stack web development using Ubuntu Desktop 12.04 LTS. Since my web server runs Ubuntu Server 12.04 LTS this gives me an matching server stack. I feel this will ...

Installing TrueCrypt and LastPass on Ubuntu Linux

When it comes to truly secure, crossplatform, password management and file encryption solutions I have two go to options; LastPass and TrueCrypt. Since these are not available in the Ubuntu repositories, installing these on Linux is a manual process. The following will make installing both of these ...

Installing Oracle Java and Netbeans on Ubuntu

I run Ubuntu Server 12.04 LTS as my web server and Ubuntu Desktop 12.04 LTS as my development environment. This gives me the piece of mind that what I'm building locally will most likely behave the same way once it's been deployed on the server. Ubuntu by default, expects to use OpenJDK as opposed t...

Silence Exchange Notifications on your Samsung Galaxy S3

This one took me a while to figure out, so I thought I would share. When adding ActiveSync for Exchange to your your Galaxy S3 the sound settings are not what you might expect. The default is an annoying little bell and a vibration. I'd rather have, at most, a vibration. The solution is simple, just...

Changing The Default Editor In Ubuntu Linux

By default Ubuntu provides nano as it's command line editor. Personally I prefer VIM. Ubuntu provides a simple utility for changing the default editor. Run the following from the command line: sudo update-alternatives --config editor Ubuntu will return a dialog similar to the following, simply p...

phpMyAdmin Post Configuration

PhpMyAdmin is a PHP based web admin panel for MySQL. It has been my go to GUI for MySQL for more than 10 years. Over the years I've ran PHP on Windows, Mac and various flavors of Linux; currently Ubuntu. PhpMyAdmin has worked flawlessly the entire time. What I've come away with are few tips and best...

Running a T-Mobile Galaxy S3 On AT&T

I shattered yet another iPhone digitizer so my boss hands me a Samsung Galaxy S3. The problem is that my I still have some time left on my AT&T contract and the company phones are all T-Mobile. Their is however a bright side; in addition to AT&T and T-Mobile both running on GSM networks, bot...

Building A Lamp Stack On Ubuntu 12.04

Whenever I build or make changes to a server I always try to write down what I have done. This makes for some great references on future builds. In addition, their are a ton of guides and tutorials available for building a LAMP stack, you should read them all, or atleast as many as you can. I say th...

Git Submodule Tips

I've recently started using git submodules as a way of implementing a continual integration strategy within plugin based architectures. Here are a few tips I've found for making this easier. Managing Submodules Always remember to tell git about any changes you make to a submodule. You'll want to (1)...

DNS Flush

When your surfing the web your system caches the location of all websites it comes across by saving the IP address and domain name. For example: 10.10.10.10 www.example.com While is great for reducing overhead by skipping the DNS lookup; problems arise when the website changes it's IP. If your ever ...

Setting Up NetBeans And Sun Java6 In Lucid Lynx Ubuntu 10 4

See Installing Oracle Java and Netbeans on Ubuntu for an up to date version of this article. I'm always picking up different tools and weighing them against my current method of doing things. As a web developer my integrated development environment (IDE) is a critical piece of my day. Traditionally,...

Use Google DNS With Open DNS And Local Fallback In Ubuntu Linux

Every web site resolves to an IP address. Domain names such as jasonsnider.com are mapped to an IP address in this case 173.45.227.188. DNS servers provide a directory of Domain names to their corresponding IP addresses. When you make a request to a web site, your system will query a DNS server, tha...

Accessing Phpmyadmin After Apt Get Install

When working in a Debian based system, apt-get is a great utility for installing packages and programs. phpMyAdmin one of my favorite tools for dealing with a MySQL database. Naturally, I install phpMyAdmin using apt-get. Depending on the version of your Debian based OS or anything that may have gon...

Git Setup A Server And Web Based Workflow In About 10 Minutes

Early on in my career I tracked my code changes using a text editor then pushed those changes over FTP, I knew there had to be a better way. Eventually, I was introduced to concurrent version system (CVS). While this did automate the tracking process and brought some since of sanity to team coding e...

Multiplatform Development And Testing

As a web developer I have found there are three things I cannot live without. The LAMP stack, Adobe and IE6. I know what your probably thinking. There are Linux alternatives to Adobe and IE6 is an old legacy browser, why worry about it? I will not argue either point as they are both valid. Those poi...

Building Traffic Reports

Yesterday, in my article about tracking user data we talked about how to access and store data about your web sites traffic. Today we will discuss how to use it. To make our traffic report we need to collect, store and retrive the data about each of our users. For this example we'll use MySQL as our...

Tracking Ip Addresses And Other User Data

Tracking information about your user such as how they got to your site (directly, a search engine, referral link, etc) is a critical piece in gathering the needed data to properly analyze your traffic. This data can help you make better decisions to help improve your overall user experience. Today I...