Skip to content

Instantly share code, notes, and snippets.

View deepakaryan1988's full-sized avatar
🏠
Working from home

Deepak Kumar deepakaryan1988

🏠
Working from home
View GitHub Profile
{
"bold_folder_labels": true,
"caret_style": "wide",
"default_line_ending": "unix",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"fallback_encoding": "UTF-8",
"find_selected_text": true,
"font_options":
# Ignore emacs backup files...
*~
# Ignore configuration files that may contain sensitive information.
sites/*/settings.php
# Ignore paths that contain user-generated content.
.sass-cache/*
sites/*/files
sites/*/private
cd /var/www
drush dl drupal --drupal-project-rename=d7
cd d7
drush si -y --db-url=mysql://root:personofinterest@localhost/d7
drush upwd admin --password="admin"
//Maybe you need this
cd sites/default
@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
@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 / 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 / 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 / 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 / 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 / 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