./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
Existing schema is below: | |
ActiveRecord::Schema.define(:version => 20120130161449) do | |
create_table "movies", :force => true do |t| | |
t.string "title" | |
t.string "rating" | |
t.text "description" | |
t.datetime "release_date" | |
t.datetime "created_at" |
Update the hosts file in /etc/hosts
to maintain multiple domains/hostnames on a local machine for 127.0.0.1 and setup a VirtualHost container in /Applications/MAMP/conf/apache/extra/httpd-vhost.conf
via /Applications/MAMP/conf/apache/httpd.conf
for a name-based virtual host.
- Related tutorial: http://osxdaily.com/2012/08/07/edit-hosts-file-mac-os-x/
- Documentation: http://httpd.apache.org/docs/2.2/vhosts/
Only suitable for MAMP users under OS X Lion, OS X Mountain Lion, and OS X Mavericks on Apache-Port 80 and MySQL-Port 3306.
- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
Press minus + shift + s
and return
to chop/fold long lines!
<?php | |
/* | |
One wp-config for local development to staging to production. | |
*/ | |
// Define Environments | |
$environments = array( |
I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.
Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
<?php | |
/* Pull apart OEmbed video link to get thumbnails out*/ | |
function get_video_thumbnail_uri( $video_uri ) { | |
$thumbnail_uri = ''; | |
// determine the type of video and the video id | |
$video = parse_video_uri( $video_uri ); | |
// get youtube thumbnail |
<?php | |
function urlsafe_b64encode($string) { | |
return str_replace(array('+','/','='),array('-','_',''), base64_encode($string)); | |
} | |
$timestamp=time(); | |
$ampBaseUrl = "https://www-domain-com.cdn.ampproject.org"; | |
$signatureUrl = '/update-cache/c/s/www.domain.com/amp/page-url?amp_action=flush&_ts='.$timestamp; |