Skip to content

Instantly share code, notes, and snippets.

@vineettalwar
vineettalwar / vvv-php72-error.txt
Created July 6, 2018 13:08
Error came while doing vagrant reload --provision after adding new site
default: Package configuration┌──────────────────┤ Modified configuration file ├───────────────────┐│ A new version of configuration file /etc/php/7.2/cli/php.ini is ││ available, but the version installed currently has been locally ││ modified.││││ What do you want to do about modified configuration file php.ini? ││││install the package maintainer's version││keep the local version currently installed││show the differences between the versions││show a side-by-side difference between the versions││start a new shell to examine the situation││││││<Ok>│││└────────────────────────────────────────────────────────────────────┘ default: After this operation, 0 B of additional disk space will be used.
default: Failed to open terminal.
default: debconf: whiptail output the above errors, giving up!
default: dpkg: error processing package php7.2-cli (--configure):
default: subprocess installed post-installation script
@vineettalwar
vineettalwar / nginx-phpfpm.sh
Created October 21, 2017 22:32
Install nginx , php5.6 fpm on amazon linux
sudo yum install php56-fpm
sudo yum install nginx
sudo yum install php56-common
sudo chkconfig php56-fpm on
sudo chkconfig php-fpm on
sudo service php-fpm start
@vineettalwar
vineettalwar / htaccess_change_document_root_cpanel_primary_domain.txt
Created November 27, 2016 00:02
htaccess for Changing Document root of primary domain in cpanel hosting to a subdirectory inside public_html
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/example.com/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /example.com/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$example.com/index.php [L]
/comment-bubble-dark.png
==> default: A /srv/www/wordpress-trunk/wp-content/themes/twentyeleven/images/comment-bubble-rtl.png
==> default: A /srv/www/wordpress-trunk/wp-content/themes/twentyeleven/images/comment-arrow-bypostauthor.png
==> default: A /srv/www/wordpress-trunk/wp-content/themes/twentyeleven/images/comment-bubble.png
==> default: A /srv/www/wordpress-trunk/wp-content/themes/twentyeleven/images/search.png
==> default: A /srv/www/wordpress-trunk/wp-content/themes/twentyeleven/images/comment-arrow-dark-rtl.png
==> default: A /srv/www/wordpress-trunk/wp-content/themes/twentyeleven/images/headers
==> default: A /srv/www/wordpress-trunk/wp-content/themes/twentyeleven/images/headers/lanterns-thumbnail.jpg
==> default: A /srv/www/wordpress-trunk/wp-content/themes/twentyeleven/images/headers/trolley-thumbnail.jpg
==> default: A /srv/www/wordpress-trunk/wp-content/themes/twentyeleven/images/headers/chessboard.jpg
@vineettalwar
vineettalwar / vagrant-provision_from_scratch.log
Created September 15, 2016 00:15
vagrant provision from scratch (mingw bash running normally / without run as administrator)
Vineet@Vineet MINGW64 /e/workspace/VVV (master)
$ git pull
remote: Counting objects: 395, done.
remote: Total 395 (delta 121), reused 121 (delta 121), pack-reused 274
Receiving objects: 100% (395/395), 159.09 KiB | 0 bytes/s, done.
Resolving deltas: 100% (214/214), completed with 33 local objects.
From https://github.com/Varying-Vagrant-Vagrants/VVV
698f4c7..7027632 master -> origin/master
a7e3214..1f99518 develop -> origin/develop
@vineettalwar
vineettalwar / wordpressorg-folder-remove-vagrant.log
Created September 7, 2016 11:19
vagrant log after wordpressorg remove in wme
$ vagrant provision
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 vvv
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 vvv.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 local.wordpr ess.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 local.wordpr ess-trunk.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 src.wordpres s-develop.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 build.wordpr ess-develop.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 buddypressor
$ vagrant provision
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 vvv
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 vvv.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 local.wordpr ess.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 local.wordpr ess-trunk.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 src.wordpres s-develop.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 build.wordpr ess-develop.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 buddypressor
@vineettalwar
vineettalwar / noindex_subdomain.php
Created June 22, 2016 20:27
THis file will no index no follow the subdomain pages.
<?php
function example_no_index{
if(get_bloginfo( 'url' ) == "http://subdomain1.example.com" || "http://subdomain2.example.com")
{
if ( is_home() )
{?>
<meta name="robots" content="noindex,nofollow">
<?php
}
<?php
/* Add Google analytics code to wp_head */
add_filter('wp_head','add_analytics_to_wphead',15);
function add_analytics_to_wphead(){
?>
<script>
//analytics or tag manager code
</script>