Skip to content

Instantly share code, notes, and snippets.

View deepakaryan1988's full-sized avatar
🎯
Focusing

Deepak Kumar deepakaryan1988

🎯
Focusing
View GitHub Profile

How To Install Memcache on MAMP 2

  1. Install memcached. I'd suggest using homebrew. brew install memcached
  2. Select your desired version of PHP that you'd like to use in MAMP. This dropdown is located in the PHP tab in MAMP PRO.
  3. Visit the Downloads Page on php.net and download the source code. If your release isn't listed, visit the Releases page.
  4. Extract the source into /Applications/MAMP/bin/php/[php version folder]/include/php.
  5. /Applications/MAMP/bin/php/[php version folder]/include/php/configure
  6. /Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache.
  7. Add extension=memcache.so to your php.ini
    • MAMP Pro: /Applications/MAMP\ Pro/MAMP\ PRO.app/Contents/Resources/php[your php version].ini
@deepakaryan1988
deepakaryan1988 / drush-MAMP-osx
Last active August 29, 2015 14:13
install drush on osx with MAMP
Ref:- http://cambio.name/personal/content/installing-drush-7x-adding-dependencies-using-composer
Installing Drush 7.x (Adding dependencies using composer)
Submitted by admin on Sat, 07/12/2014 - 14:23
1. Download package in some folder
@deepakaryan1988
deepakaryan1988 / field_collection
Created December 18, 2014 11:35
update field collection without saving entity
http://alexrayu.com/blog/saveupdate-field-collection-without-nodesave
// Get field collection (supposedly containing one image with meta data)
$fc = entity_load('field_collection_item', array($fcid));
// If we were to have multi-value fc's, we weould have a cycle here in place of current()
$fc = current($fc);
// Get meta data. A custom function.
$meta = custom_get_meta_data($fc);
@deepakaryan1988
deepakaryan1988 / Apachesolrsetup
Last active August 29, 2015 14:10
Apache solr set up
Ref :- https://drupal.stackexchange.com/questions/95897/apache-solr-4-6-0-installation-and-compatibility-with-drupal7/124038#124038
You aren't alone I had to scower the internet and read several articles before I truly understand all of this. I tried about three different methods until I finally got it right!
If you are using Debian/Ubuntu (with Tomcat7) it's even easier then most outline. I preferred this over Lullabot since when you install it through Ubuntu it's actually a service and less fiddling :)
Install Java
apt-get install java7-jdk
Install Tomcat
@deepakaryan1988
deepakaryan1988 / gist:6280b512923cd57fc0de
Created November 27, 2014 14:06
Redirect all traffic to https from http
Ref:- https://www.ndchost.com/wiki/apache/redirect-http-to-https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
@deepakaryan1988
deepakaryan1988 / mongo.settings.php
Created November 14, 2014 07:10
create local.settings.php for settings up mongodb by drupal
<?php
#MongoDB
$conf['mongodb_connections'] = array(
'default' => array( // Connection name/alias
'host' => 'localhost', // Omit USER:PASS@ if Mongo isn't configured to use authentication.
'db' => 'YOURDATABASENAME' // Database name. Make something up, mongodb will automatically create the database.
),
);
@deepakaryan1988
deepakaryan1988 / installmongodb
Created November 7, 2014 09:54
Install mongo DB and driver with MAMP support
Source:- http://toodlepip.co.uk/2014/installing-mongo-mongo-php-mac-osx-mavericks-mamp/
Step:-
1. brew install mongodb
2. brew install autoconf
3. curl -O http://museum.php.net/php5/php-5.5.3.tar.gz
4. cd /Applications/MAMP/bin/php/php5.5.3/
5. mkdir include
6. cd include
7. mkdir php
@deepakaryan1988
deepakaryan1988 / drushdrupalcore
Last active May 18, 2018 07:38
Updating the drupal core only with drush
https://www.drupal.org/node/1494290#comment-6882712
How to update Drupal core with Drush
(Drush is a command line tool for Drupal).
1. Backup everything (all files, databases, etc)
2. Put your site in maintenance mode
Either from Drupal interface or with drush:
(commands for Drupal 7)
@deepakaryan1988
deepakaryan1988 / wysiwyg_ckeditor_media
Created October 29, 2014 20:21
Good article about configuring wysiwyg, ckeditor and media field
http://chapterthree.com/blog/drupal-wysiwyg-best-practices
@deepakaryan1988
deepakaryan1988 / gist:0a4f89d25ab1124589e5
Created June 30, 2014 09:48
command for running mysql command on MACOS with using MAMP
sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/local/bin/mysql