So, tonight I decided to start brushing up on Java. No real reason, other than it’s nice to know a language that is used in so many places. I started a Lynda.com course called Up and Running With Java. It’s
Factories and base classes
Today I refactored some code, And for the first time ever I wrote a factory class. I have a class that calls a specific service on the web. I had that class directly referenced in other parts of my code.
PHP Architect’s Zend PHP Certification Study Guide
So, today I started chapter three, on arrays. I learned something new! The list() function. That may just come in handy someday. 🙂
The Checklist Manifesto
At SunshinePHP this year, at one of the talks, the speaker mentioned a book called “The Checklist Manifesto”. I started reading it yesterday and I’m halfway through it already. It’s a good read that explains why checklists are so vital
IRC and Industry Standards
Since returning from SunshinePHP I have been using IRC again. I may start posting about the various functions it offers, as I learn them. Today I discovered Slack, and got our team set up. We should be fully up and
Sunshine PHP 2015
This year’s Sunshine PHP conference is only the second I’ve attended. My first was Tek in Chicago, in 2013. Having 2 years of PHP experience behind me now has made a big difference in my understanding of the topics presented
Which way is better?
While going though some code in a plugin (not one I wrote), I came across the following snippet: if ( !isset($update_transient->checked) ) return $update_transient; else $themes = $update_transient->checked; Looking at this makes me cringe. Here’s how I would write this:
2014: A look back
So here we are on the eve of a new year. 2014 has been a good one for me. I decided to look back over my posts for the year, and discovered that I only posted 10 times in 2014!
What does > /dev/null 2>&1 mean?
I came across this recently in a script, so I searched for it to gain an understanding of what it means. Here’s what I found: http://www.xaprb.com/blog/2006/06/06/what-does-devnull-21-mean/
SSH on Debian: Allow public key access only – no passwords
cd /etc/ssh cp sshd_config sshd_config.orig nano sshd_config Make sure the following three lines are set to “no”. They may be in various locations throughout the file: PermitRootLogin no PasswordAuthentication no UsePAM no Then restart the service: /etc/init.d/ssh restart I learned
WordPress plugin OOP template
<?php /* Plugin Name: Plugin URI: http:// Description: Version: 1.0 Author: Kenny Ray Author URI: http:// License: GPL2 */ if (strpos($_SERVER[‘SERVER_ADDR’],’localhost’)) { error_reporting(E_ALL); ini_set(‘display_errors’, 1); } // Be sure to update this name, and make the one at the very
Setting fully qualified domain name for Apache server
Edit /etc/apache2/httpd.conf Search, using ctrl-w, for ServerName Uncomment this line: #ServerName www.example.com:80 and then change the last part to “localhost” ServerName localhost
Installing Laravel site: permissions
If you get this error Error in exception handler. when trying to hit the root of a new install, do these two things on OSX: sudo chown -R _www app/storage (replace _www with your Apache server name if necessary)
SRP : Single Responsibility Principle
This is the clearest beginner level explanation of the Single Responsibility Principle that I’ve seen so far: http://code.tutsplus.com/tutorials/solid-part-1-the-single-responsibility-principle–net-36074
Stopped jobs in linux
When using CTRL-Z to “exit” a program, you really are not exiting it. You are suspending it. (Multitasking, remember?) To see the list of stopped jobs, type jobs To bring the last stopped job up again, and resume its execution, type fg
Learn Composer
I just found a really good video tutorial on Composer: http://knpuniversity.com/screencast/composer/composer
How to handle login correctly in an iPhone app that connects to a web service
I am currently designing an iPhone app. It uses a web api that I’m building in PHP. The app requires users to login. What I am currently researching, and having a really hard time figuring out, is if there is
iPhone: CLLocation: Get current location
Steps to basic geolocation: 1. Add CLLocation framework to Build Phases, Link Binary with Libraries 2. Set up instance variable in .h file: CLLocationManager *locationManager; 3. Instantiate and set up location manager in the .m file: locationManager = [[CLLocationManager alloc] init];
Proper way to set file permissions
For each parent directory leading to your web root (e.g. ~/my, ~/my/web, ~/my/web/root): chmod go-rwx DIR (nobody other than owner can access content) chmod go+x DIR (to allow “users” including _www to “enter” the dir) sudo chgrp -R _www ~/my/web/root (all web content is now group
PHP Sessions: Part 4
Session Locking. Some people don’t ever consider this. I have dealt with it before in another language, so I decided to do a quick search to see what it looks like in PHP. The basic idea is that only one