SQLTerminal.app
now available

XPath.app
now available
Want fresh tech tips in your inbox?
XPath Expression Editor
Practice and improve your XPath skills with XPath Editor
Click to buy on the App Store
Photo Location Changer
Easily change the location on your photos and videos
Click here for more info about the app
Photo Date Changer
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app

Posts Tagged with "Development"

Connect to Postgres on Heroku using DATABASE_URL Config Var with PHP and PDO

Unfortunately PHP's PDO constructor doesn't take a database connection url (in a format that Heroku makes available as a config var) as an argument. I...


Apache Rewrite Rule for Mapping to index.php in Sub Folders

Below is an example URL structure with rewrite rules using an Apache .htaccess file. GET /a/ => a/index.php GET /a/b/ => a/b/index.php...


How to Find An SQLite Database with React Native and the iPhone Simulator.

I spent a few hours digging around my file system using `find` and `grep` hunting for my SQLite database that the iPhone Simulator was using for my Re...


Active Admin Rails 5 undefined method per_page_kaminari

If you run into this error in development, using Rails 5 and Active Admin NoMethodError - undefined method `per_page_kaminari' Try the followin...


I Just Published My First PHP Package HTMLXPATH

I just wrote and published my first PHP package on Packagist.com. It's available on [packagist.org](https://packagist.org/packages/htmlxpath/htmlxpath...


Reshape an Array of Form Inputs for Flask with getlist()

This is how to reshape an array using Python without Numpy. This is a fairly simple task but it can be a little confusing to wrap your head around....


How to Decorate Imported Libs in Python for Jinja Template Filters in Flask

To decorate an imported function in Python you would do something like this # in ./lib.py def function_name(): # function body And then in...


Deploying Wordpress on Heroku

> This post is out of date - Heroku officially supports PHP now w/ buildpacks Heroku runs Apache version 2.2.22 PHP version 5.3.10 Deployi...


How to Create a Slug in Python with the Re Module

There are a few 3rd party modules that do this sort of thing. But there is a pretty solution using out of the box Python functionality. You don't have...


My First Python Package on PyPi - Command Line Blog

I wrote my first Python package over the weekend. It is a simple package that adds a basic blog API to an existing Flask application. It's called...


Turn Off SSL Verification In Ruby

The following code will disable SSL verification when using Open SSL. OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE It is probably no...


How To Get A Dict from Flask Request Form

You just call `to_dict` on the `request.form` object and you get a dictionary you can work with.


How To Install Pyscopg2 Python Postgres Driver on Mac OSX with Homebrew, Postgres.app and VirtualEnv

You might have to append the path of the Postgres.app bin directory to your path in order to install the Python driver for Posgres. export PATH=$P...


Open Files in TextMate 2 with A Single Click

To open files with a single click from the file browser inside of TextMate 2 run this command from the terminal defaults write com.macromates.Tex...


How to Fix Line Wrap Bug in iPython Terminal on OS X Mavericks

There is annoying line wrap issue present after installing iPython on OS X Mavericks for the first time. The issue has to do with readline being missi...


How to Use RVM and POW with Ruby 2.0.0

In your project's root directory add a .ruby-version file and add the ruby version to the file ruby-2.0.0-p247 Next source RVM in the .powrc fi...


How to Boot Up Multiple Sinatra Applications at the Same Time with Foreman

Foreman is a process management gem for ruby applications. It is used in combination with a Procfile for configuration instructions. A typical Proc...


Installing Ruby with RVM without Xcode using CLANG

I am not using the full Xcode package on my laptop. Instead I'm using the command line tools, offered by Apple as a separate and much smaller instal...


Color Output with Test:Unit, AutoTest and Ruby 1.9

If you are testing using Test:Unit (rather than RSpec) and you're using Ruby 1.9.* colorized output of your tests using Autotest will not be immediate...


How to Upgrade RVM on Mac OS X

I had an old version of rvm installed and wanted to upgrade. So old in fact that the resource for upgrading no longer existed. rvm update </pre...


Ruby Reload! Method in Non Rails IRB Sessions

I love the Rails reload! function when in the console. I need it in Irb. To get it back this is what I did. If you don't already have an .irbrc file...


Git Feature Branch Naming Strategy

There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton Typically, we have...


Git Untrack Already Tracked Files

To remove files that are currently being tracked by git, you have to remove them from the "cache". Note, doing this will NOT delete the file on your l...


Link to jQuery Source from Google's CDN

https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js That is the link to the jQuery source hosted by Google on their CDN. It's probably a...


How to Copy and Paste to/from the Global Register with Tmux on Mac OS X

Using the system clipboard with tmux on OS X is broken. I really like tmux but having copy and paste is kind of important for me. Here is my attempt t...


Rails 3 disable_with Does Not Work with Ajax Remote Form_for

It appears that the :disable_with option on the submit_tag form helper method does not behave as expected with remote forms. I'm not sure if this is a...


Setting Up Users, Permissions and Groups for SSH Access to a Shared Git Repository

If you are having permission problems using git, such as error: insufficient permission for adding an object to repository database ./objects</p...


Installing and Using Rvm on Mac OS X, Creating Gemsets and Reverting to Original Environment

What is RVM and why should you use it? RVM is a Ruby interpreter, version management tool. In short, it enables you to switch between different versio...


How to Import/Export Your Wordpress Blogroll... er, Your Links

It's not immediately apparent how to import/export the links in your Wordpress blogroll. One would expect that the import/export tool, used to backup/...


My Review of Moodle 1.9 Extension Development

I wrote a review for Joseph Thibault's Moodle News on extension development for Moodle. The book is quite good and...


Natural Dog Training

Natural Dog Training uses Wordpress to run a blog and content management system. <!--more-...


Defining Application Constants for Ruby on Rails Application

The best place to keep application constants which are environment specific is in config/environments directory. For instance... # in RAILS_ROOT...


Setup Wildcard Subdomain on Localhost for Development Work without /Etc/hosts TomFoolery

Step 1. Open up your browser and visit http://www.hexxie.com. You can also go to anything.hexxie.com and...


Extending Rails Form Builders

Extending forms in Rails is simple and will greatly reduce the amount of code in your views. This example is taken right from the Agile Web Developmen...


Install and Serve a Rails Application from PHP Subdirectory Using Apache, Phussion Passenger and Ruby Enterprise Edition

Here is how to install a Rails application out of a subdirectory (rather than as a subdomain) with the Apache web server(Apache2). In this example I'm...


The survey for people who make websites

I took the survey! Click here to take it → <img style="border:none;" src="http://aneventa...


Mod_Python and Web.py on Ubuntu

Download First install mod_python for Apache and then restart/reload the server. apt-get install libapache2-mod-python /etc/init.d/apac...


Output Logger and SQL to the Rails Console in Development Mode

If you want to take a look at the SQL being generated by active record while your using the console, you can either type this into the console when it...


Installing Scala on Mac OS X Leopard

I followed the instructions from here http://arvinderkang.com/2009/09/01/installing-scala-on-snow-leopard/ but I used version 2.7.6 (rather than .5) I...


Install MySQLdb for Python on Mac OS X

I don't do much python development. I really like the language and there are a lot of great software projects out there for it. Tornado, for example,...


Install do_mysql Ruby Gem on Mac OS X

I ran into the same problem when installing mysql gem for Rails development. This fix worked for me http://seanbehan.com/programming/fixing-mysql-for-...


Manage Sinatra Server in Development Mode with Shotgun

Sinatra won't reload your files. So if you're developing your app and want to see any changes made in the browser, install the shotgun gem. gem...


Fixing MySQL for Rails 2.2 Development on Mac OS X

Oh what trouble Rails 2.2 and MySQL (on Mac OS X) can be. Rails, as of version >= 2.2, no longer comes bundled with the MySQL adapter. This means you'...


Installing Sphinx Search Engine on Mac OS X... or ld: library not found for -lmysqlclient

If you are trying to install Sphinx on Mac OS X, it will most likely fail. The current version of MySQL bundled with Mac OS X is not supported and the...


Why Doesn't Google Offer Dedicated Virtual Hosting?

AppEngine is nice, but it's a little limiting. No cron jobs, filesystem use nor customization with third party libraries, software, databases, languag...


Postfix, ActionMailer and OpenSSL Fix on Ubuntu

If you run into problems using ActionMailer > 2.2, Postfix and OpenSSL while sending mail from your application, try changing the following: v...


Sending eMail with Rails on Mac OS X Development Environment

You'll need a mail transport agent (MTA). I installed and used postfix using Mac Ports. sudo port install postfix You'll need to start po...


How to Install Ferret, the Full Text Search Engine with Your Rails Application

Ferret is a full text search engine based on the popular Lucene Engine, which is originally written for Java. There is a great tutorial available here...


Starting the Rails Console in Production Mode

To specify which mode you'd like the rails console to boot up in, just provide the string without any flags. ./script/console production ./scri...


Set Cron Job to Run Every Five Minutes for a Ruby on Rails Rake Task

First off you'll need to edit your cron file. Normally, the cron files are kept under /etc/cron.daily or /etc/cron.hourly but we can just use the comm...


When the cloud is a good idea

A buddy of mine is a talented, but paranoid System Administrator for a small web company. He refuses to see the truth and the beauty in the wonderful...


git checkout -- file-in-question.oh-my

Problem: using git and one file, like your db/schema.rb, is out of whack with the latest branch. If you run git pull and you get a failed merge and no...


rails fixtures: using the right timestamp

Fixtures in Rails allow you to quickly and easily populate a database with sample data. They are great when testing your app and you need to test agai...


the simple things with git

Git can track the file permissions on your source. This can be good, but for small projects on a webserver where permissions change from time to time,...


mysql on rails 2.3.2

mysql driver is no longer bundled w/ rails. you'll need to install it yourself w/ sudo gem install mysql however, on ubuntu (heron) this...


Setting up a new ubuntu server with apache2, php, ruby on rails, rubygems, mysql, and git

Here are a list of commands to get up and running with Apache2 with Phussion Passenger for Rails, PHP5, MySQL5, Ruby on Rails with Gems, and the sourc...