How to checkout a remote branch in git

In order to avoid conflicts when checking out a branch from a remote repo you need to check it out directly. git fetch origin git branch -f remote\_branch\_name origin/remote\_branch\_name git checkout remote\_branch name git checkout -b production origin/production Simple.

How to get laravel database prefix

I needed to get the db prefix for a raw insert query I was running. It's an easy function call to get the current database prefix. DB::getTablePrefix(); Will output the prefix for the current database. This will work in laravel 4.

How to get the base directory of a laravel 4 installation.

In order to get the base directory of a laravel 4 install you'll just need to do one command. It's fairly simple. app()->make('path.base')

How to get logitech m705 working in linux mint

I am using a new laptop, ASUS Zenbook, running linux mint cinnamon. My preferred mouse is a logitech m705 for use on the go. I needed to get it working since it wasn't out of the box. There's several ways to get the unifying receiver working. The easiest for me …

Find the collation of all tables within a mysql database

Needing to find a collation of a mysql database for a migration I went to google. Found several options, but the best was one from stack overflow. SELECT TABLE\_CATALOG, TABLE\_SCHEMA, TABLE\_NAME, COLUMN\_NAME, COLLATION\_NAME FROM INFORMATION\_SCHEMA.COLUMNS; This will output something like: mysql> SELECT …

How to find mysql variables with a query, specifically data directory

I needed to find out the data directory for mysql. A quick way to do this within mysql is to use the show variables command. mysql> show variables; Which will output something like: +-----------------------------------------+-------------------------------------------------------------------------------------------+ | Variable\_name | Value | +-----------------------------------------+-------------------------------------------------------------------------------------------+ | auto\_increment\_increment | 1 | | auto\_increment\_offset | 1 | | autocommit | ON | | automatic\_sp\_privileges …

Laravel 4 release date

When will Laravel 4 be released? Per Taylor's announcement at Laracon it will be released in May of 2013. Further on the wiki there is a time table for the next 4 releases. Is Laravel 4 stable enough to use in production? I would say yes. At this point in …

How to specify specific engine in Laravel 4 migration

Earlier today I needed to set up a specific database engine for a mysql table that wasn't the databases's default. In this instance, the default was INNODB and I needed it to be MyISAM. We could discuss the reasons why I shouldn't use MyISAM but in this instance that's what …

Using xargs to parallel a process in the command line

Most of us have multiple CPUs in our personal machines. I would also hope that your servers do too. If you're running an intensive command line process, running them in parallel will speed it up by paralleling the process. Say you need to find a string in all of your …

Under PHP's Hood

Recently watched/listened to Sebastian Bergmann presentation on PHP interpreter. Very useful way to brush up on how php processes a request. Audio From techportal Slides: PHP Compiler Internals by kaplumb_aga