This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Declaring the variables | |
$error_name = ''; | |
$error_email= ''; | |
$error_gender =''; | |
//Validation part | |
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
$name = $_POST['name']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install varnish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DAEMON_OPTS="-a :6081\ | |
-T localhost:6082 \ | |
-f /etc/varnish/default.vcl \ | |
-S /etc/varnish/secret \ | |
-s malloc,256m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cp /lib/systemd/system/varnish.service /etc/systemd/system/ | |
# nano /etc/systemd/system/varnish.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Varnish HTTP accelerator | |
[Service] | |
Type=forking | |
LimitNOFILE=131072 | |
LimitMEMLOCK=82000 | |
ExecStartPre=/usr/sbin/varnishd -C -f /etc/varnish/default.vcl | |
ExecStart=/usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m | |
ExecReload=/usr/share/varnish/reload-vcl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
/** | |
* @file | |
* Default theme implementation to display a node. | |
* | |
* Available variables: | |
* - node: The node entity with limited access to object properties and methods. | |
* Only method names starting with "get", "has", or "is" and a few common | |
* methods such as "id", "label", and "bundle" are available. For example: | |
* - node.getCreatedTime() will return the node creation timestamp. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "WebSite", | |
"url": "http://www.yoursite.com/", | |
"potentialAction": { | |
"@type": "SearchAction", | |
"target": "http://www.yoursite.com/?s={your_search_term}", | |
"query-input": "required name=your_search_term" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createCategory(){ | |
$parentId = 1;// Any of your parent category | |
$category = Mage::getModel('catalog/category'); | |
$category->setName('My First Category'); | |
$category->setUrlKey('My-First-Category'); | |
$category->setIsActive(1); // to make active | |
$category->setDisplayMode('PRODUCTS'); | |
$category->setIsAnchor(1); // This is for active anchor | |
$category->setStoreId(Mage::app()->getStore()->getId()); | |
$parentCategory = Mage::getModel('catalog/category')->load($parentId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$access_token = '398021147245479|1e3e221bc154a0fdbbf5372d80a35318'; | |
$graph_url= "https://graph.facebook.com/TheToyStore.ME/events"; | |
$post_datta = "access_token=" .$access_token."&method=get&fields=cover,description,name"; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $graph_url); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_datta); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); |