Skip to content

Instantly share code, notes, and snippets.

View deepakaryan1988's full-sized avatar
🎯
Focusing

Deepak Kumar deepakaryan1988

🎯
Focusing
View GitHub Profile
@deepakaryan1988
deepakaryan1988 / drupal_phpcs_install.sh
Created November 10, 2017 11:07
Install PHPCS and use the Drupal Coding Standard from the coder module.
; cd into the directory you store code resources.
cd ~
; Clone PHP_CodeSniffer directly from the github repo.
; You could also install via pear.
git clone [email protected]:squizlabs/PHP_CodeSniffer.git
; Clone the coder branch you want.
@deepakaryan1988
deepakaryan1988 / customslider
Last active July 25, 2017 05:15
Custom slider with custom values
https://jsfiddle.net/2sxugxgd/3/
@deepakaryan1988
deepakaryan1988 / gist:14360f3d399a2d3e7594c0e41a12d762
Created May 11, 2017 15:38
Editing to config.yml in vagrant
1. just edit config.yml file while vagrant is running.
2. run vagrant provision
3. run vagrant reload
@deepakaryan1988
deepakaryan1988 / drush.alias
Created May 11, 2017 15:13
Getting all the alias from drush
drush sa
@deepakaryan1988
deepakaryan1988 / drupal-7-example-local-settings.php
Created November 24, 2016 18:23 — forked from delphian/drupal-7-example-local-settings.php
Example of drupal 7 local settings.php file.
<?php
// To set up a local environment, make a duplicate of this file and name it
// local-settings.inc in the site directory that contains the settings.php file.
// Ignore sites/*/local-settings.php in the .gitignore file. Change the settings.php
// file to include local-settings.php if the file exists.
// Point database to local service.
$databases['default']['default'] = array(
'database' => 'local_db_name',
@deepakaryan1988
deepakaryan1988 / Running a drush command on all sites in multisite aegir installation
Created April 27, 2016 13:05
Bash script to loop through all the different platforms/sites on an aegir deployment, and performs drush commands against them.
#!/bin/bash
for dir in /var/aegir/platforms/*
do
cd "$dir/sites"
drush @sites -y ev "variable_set('smtp_host', 'your_host');"
drush @sites -y ev "variable_set('smtp_username', 'your_user');"
drush @sites -y ev "variable_set('smtp_password', 'your_pass');"
drush @sites -y ev "variable_set('smtp_port', 'your_port');"
done
https://www.drupal.org/files/file-types-youtube-wysiwyg.png
@deepakaryan1988
deepakaryan1988 / Mampsettings
Last active June 6, 2024 10:53
Mamp pro settings for max_execution_time out.
1. Go to File > Edit Template > Apache > httpd.conf
2. Do a Find & Replace for MAMP_FastCgiServer_MAMP
3. Comment out the line MAMP_FastCgiServer_MAMP
4. Add a config line for your version of PHP, with the desired timeout limit at the end like so: FastCgiServer /Applications/MAMP/fcgi-bin/php5.6.2.fcgi -idle-timeout 3600
@deepakaryan1988
deepakaryan1988 / installsolronmac.txt
Last active April 25, 2016 15:19
install solr on macosx
http://nickveenhof.be/blog/simple-guide-install-apache-solr-3x-drupal-7
Launching it on mac
cd /usr/local/Cellar/solr36/3.6.2/libexec/example
java -jar start.jar
@deepakaryan1988
deepakaryan1988 / wp-live-local.txt
Last active November 27, 2015 15:26
Dumping WP site from live to local
UPDATE wp_options SET option_value = replace(option_value, 'http://www.example.com', 'http://localhost/test-site') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.example.com', 'http://localhost/test-site');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.example.com','http://localhost/test-site');