Skip to content

Instantly share code, notes, and snippets.

View mariadanieldeepak's full-sized avatar

Maria Daniel Deepak mariadanieldeepak

View GitHub Profile
// Checking NGINX config file syntax
sudo nginx -t
// Restart NGINX server
sudo service nginx restart
location ~ \.php$ {
// Include the fastcgi-php.conf file.
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
@mariadanieldeepak
mariadanieldeepak / nginx-version
Last active March 23, 2018 19:33
List the nGinx version
daniel@myserver:~$ nginx -v
nginx version: nginx/1.10.3 (Ubuntu)
@mariadanieldeepak
mariadanieldeepak / rothys-thank-you-page-gtm-variables.js
Last active December 7, 2017 11:15
Use this script on the Thank You Page in Shopify to send the values to GTM
<!-- Start: Send variables to GTM -->
<script type="text/javascript">
{% if checkout.order_id or checkout.id %}
var productId = "",
isInsolesOnlyOrder = "true";
{% for line_item in checkout.line_items %}
{% if line_item.product.type != 'Insole' %}
isInsolesOnlyOrder = "false";
{% endif %}
productId += "{{ line_item.product.id }}";
@mariadanieldeepak
mariadanieldeepak / id_rsa.pub
Created November 30, 2017 05:48
Daniel's Public Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJO4loiCfAZ015t8Lh7pc2ZO/Dq5F2YGKB63YgyQtdV7jJ/GkspH7bmGBtEdfaE9kLzySLsTdxYaTTbkpUJOkc9p29Ufv9ksx3eF78t2LwbLxZIz51R/AAP5GDvChAxq3VwajHE2QrovxqXzxuqa0PiWNrLjVaG1Uzp8azEdweOKRtIn+jaWBnFvK8H03eixxW98mqXUlwDYwCktiqJzF6WZDPcx5rkNB5FoYlSc1Y8Q/pXZnEGfXdadwV0Q3A6FLzIsIPKxkG4kQpY7guvaCwWeKBDY/4qxkWhh8cs9QD3EVqGmnp8Go/zAeeXPnAyF3T0FAixmkAp/HiJdsBAeURE4ds+3l/I0lbwVPuC69bT6RsX/CLXMch8h4rvPKStEvewEtcQ9wAK+gFDpMDWZDrG+TXuziNdpldTw5O9rpYPkoI/aj/KgHQISmUdXdFX4dvG7M/5TfXtSEVDnRRYlsXihb646t0U5IOp82ScJKHVqxK/HHHH73geYSMSWXiur9X6eAJ3yvm+XD0t4CrnLx5owDeCVbEtoAsbWGUQQOu+3r6pxf4M4EuL2kPnNBd3oI4+qWYmgkckwlidJV0vpGnxWuG1J2a1yH8oMPE7CS3xRxQxPz0t5yU7vK3GWMt5pRyqQPHJCB/8yg2AwCUsucGE8bnSRv3rpHw5xlwjtSb/w== mariadanieldeepak@gmail.com
@mariadanieldeepak
mariadanieldeepak / vagrant-up-error.sh
Created November 24, 2017 03:51
Facing vm: a box must be specified issue?
➜ vvv git:(develop) ✗ vagrant up --provision
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* A box must be specified.
@mariadanieldeepak
mariadanieldeepak / system-info.txt
Created October 27, 2017 10:40
WP Search System Info
### Begin System Info ###
## Please include this information when posting support requests ##
Multisite: No
SITE_URL: https://breakingintowallstreet.com/biws
HOME_URL: https://breakingintowallstreet.com/biws
function add_async_attribute( $tag, $handle ) {
if ( 'my-google-adsense-js' !== $handle) {
return $tag;
} else {
return str_replace(' src', ' async="async" src', $tag);
}
}
apply_filters( 'script_loader_tag', 'add_async_attribute' );
// Use the following code your WordPress widget
// If you're using WordPress 4.8 or 4.8+, make sure to switch to Text mode in Text widgets.
<!-- 300x250_sidebar -->
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-1XXXXXXXXXXXXXXX"
data-ad-slot="4XXXXXXXXX"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<?php
// Add the following snippet to your functions.php file.
function my_google_adsense() {
wp_enqueue_script( 'my-google-adsense-js', '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', array(), false, false );
}
add_action( 'wp_enqueue_scripts', 'my_google_adsense' );