Categories
Web Development

Admin Controller and View with CakePHP3 bake

Example Commands

bin/cake bake model pages &&
bin/cake bake controller --prefix admin pages &&
bin/cake bake template --prefix admin pages

bin/cake bake model settings &&
bin/cake bake controller --prefix admin settings &&
bin/cake bake template --prefix admin settings

bin/cake bake model articles &&
bin/cake bake controller --prefix admin articles &&
bin/cake bake template --prefix admin articles

 

Categories
Web Development

Make Zurb 6 work better in IE8

Add the following just before the closing</head> of your page.

<!--[if lt IE 9]>
      <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
      <script src="//s3.amazonaws.com/nwapi/nwmatcher/nwmatcher-1.2.5-min.js"></script>
      <script src="//html5base.googlecode.com/svn-history/r38/trunk/js/selectivizr-1.0.3b.js"></script>
      <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js"></script>
      <link rel="stylesheet" href="css/ie8.css" />
<![endif]-->

The ie8.css file is optional but there will be some changes you will need to make.

Categories
Web Development

Setting up WordPress

  1. Download and install WordPress
  1. Transfer the WordPress files to your local host
  • Open MAMP and turn on the servers
  • Go to Applications/MAMP/htdocs
  • Create a new folder called ‘My WordPress’ and transfer the downloaded files into this folder
  1. Create database
  • In your browser, go to localhost/phpMyAdmin
  • Open the ‘database’ tab and create a new database.

  1. New User
  • Still in PhpMyAdmin open the database you just created

Make sure you have selected the correct database as this

  • Open the ‘privileges’ tab
  • Click ‘add user’ and enter your information
  • Make sure ‘localhost’ is selected in the host dropdown box
  • Once information is inputted click ‘go’
  1. Accessing wordpress
  • In your browser search for ‘example.ld’
  • And then follow the instructions to install WordPress
Categories
Web Development

Setting up a Local Domain

MAMP

Before attempting to setup a local domain ensure MAMP has the following setting:

  1. Ports
    • Apache 80
    • Nginx 7888
    • MySQL 3306
  2. Web Server
    • Server Apache
    • Document Root Applications/MAMP//htdocs (or personal preference)

Local Domains

  1. Create the local URL you want to use
    • Go to Macintosh HD/private/etc/hosts
    • At the bottom add….

      127.0.0.1 example.ld
    • Save file
  2. Ensure Virtual Hosts is enabled in your server Conf file
    • Go to Applications/MAMP/conf/apache/httpd.conf
    • Uncomment the following line…

      Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
    • Save file
  3. In the Virtual Hosts file configure your local domain settings
    • Go to Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
    • At the bottom adding the following:

      <VirtualHost *:80>
      ServerAlias example.ld
      ServerAdmin [email protected]
      DocumentRoot /Applications/MAMP/htdocs/example
      </VirtualHost>

Testing

To test your domain is working, go to the following URL

  • http://example.ld
Categories
Ubuntu

Install, Remove, or Repair Spotify on Ubuntu

Install

# 1. Add the Spotify repository signing key to be able to verify downloaded packages
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886

# 2. Add the Spotify repository
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list

# 3. Update list of available packages
sudo apt-get update

# 4. Install Spotify
sudo apt-get install spotify-client

Source: https://www.spotify.com/uk/download/linux/

Remove

sudo apt-get remove spotify-client 
sudo dpkg -r spotify-client

Repair

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
Categories
Web Development

Correct WordPress Folder & File Permissions

In terminal, use the following code to set the file and folder permissions:

chown www-data:www-data -R *          # Let apache be owner
find . -type d -exec chmod 755 {} \;  # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \;  # Change file permissions rw-r--r--

source: http://stackoverflow.com/questions/18352682/correct-file-permissions-for-wordpress

Categories
Email

Setting Up email With Rackspace

DNS Settings

Email Setup Wizard – Perfect for Clients

Categories
Web Development

Disable product tags magento

  1. Log into the Magento Admin Panel
  2. Go to System->Configuration
  3. In the Left side menu pane choose “Advanced” under the “Advanced” heading
  4. Find “Mage_Tag” in the list of modules and select Disable
  5. Click Save Config
Categories
Web Development

Change the Default welcome Message in Magento 1.9.2

  1. Log into the Magento Admin Panel
  2. Go to System->Configuration
  3. In the Left side menu pane choose “Design” under the “General” heading
  4. Select “Header” in the body of the page
  5. Find “Welcome Text“, it should say Default welcome msg! Type in the new message or delete the content to remove
  6. Click Save Config