Setting up an alias in linux is very easy and very helpful. It allows you to determine a short phrase for running a longer command. Or change a common typo to the command you meant. Here's an example alias: \$ alias lsl="ls -la" This maps lsl to the command ls …
I have to do this whenever setting up a new system. Makes the server more secure to disable password based login and only allow ssh keys. To create an ssh key it's as easy as running one of the two following commands. ssh-keygen -t dsa or ssh-keygen -t rsa The …
Yesterday I was in search of Laravel 4 documentation. I couldn't figure our where to find Laravel 4 documentation. I found the committed files on GitHub but I couldn't find the actual site that hosted it. Turns out it was in a now obvious place. http://four.laravel.com/
I wanted the url to change but there to be no redirect/refresh of the page. I was able to do this by a little js. history.pushState('data', '', 'http://' + window.location.host + '/month/' + month );
Laravel 4 currently has a very frustrating issue. If you add a model it will not know of it until you clear the autoload. [ps]composer dump-autoload[/ps] Make sure you have setup composer to be accessed globally. Otherwise you'll need to do this command. [ps]/usr/local/bin/composer …
In order to rename a whole folders file extensions from jpeg to jpg I wrote this script called rename.sh in bash. #!/bin/bash for filename in *.jpeg do echo \$filename; cleaned=`basename \$filename .jpeg`; echo \$cleaned; mv \$filename \$cleaned.jpg; done Then I made is executable from the command …
I needed to insert all of the countries in the world into a database. I couldn't find the query to run, so I created my own. Here it is. 'country' is the table name and 'name' is the column name. INSERT INTO country (name) VALUES ('Afghanistan'), ('Albania'), ('Algeria'), ('Andorra'), ('Angola' …
I’ve recently installed Ubuntu 12.04 Prestige Pangolin (I use Gnome Classic), and immediately noticed that the alt+tab shortcut wasn’t working. I tried fixing it within Applications>Systems Tools>System Settings, but that did not work. I have compiz Config Manager already install so I figured I …
An easy way to set up composer globally is to follow the instructions on getcomposer.org site: [ps] \$ curl -s http://getcomposer.org/installer | php \$ sudo mv composer.phar /usr/local/bin/composer [/ps] Now I can use composer by invoking just the composer command. Optional way to do it …
Why would I want to use the php version of a native node.js project? Well, for starters not all projects are deployed on servers that have node.js installed. Second, well, the first one is pretty much the only reason. So with that out of the way, I ran …