This document is an attempt to pin down all the things you don't think about when quoting for a project, and hopefully provide a starting point for some kind of framework to make quoting, working and delivering small-medium jobs more predictable and less stressful.
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 | |
| // Use HTTP Basic Authentication for verification | |
| $username = 'admin'; | |
| $password = 'Passw0rd!'; // Please use your own password!! | |
| // Check if the client has provided correct credentials | |
| if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] !== $username || $_SERVER['PHP_AUTH_PW'] !== $password) { | |
| // Send authentication request headers | |
| header('WWW-Authenticate: Basic realm="Restricted Area"'); | |
| header('HTTP/1.0 401 Unauthorized'); |
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 | |
| file_put_contents('/tmp/ds.' . microtime(true) . '.json', file_get_contents('php://input')); | |
| echo json_encode(array('success' => true)); |
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 http_response_code(500); ?> | |
| <?php | |
| $time_to_wait = 7200; // in seconds | |
| $site_title = 'PHKHotdeals'; | |
| $contact_link = 'https://t.me/leinad8th'; // Exemple: 'xx@xx.xx', 'https://xx.xx.xx', 'https://discord.com/invite/xxx' | |
| $logo_path = './logo-light.png'; // Spécifiez le chemin du logo | |
| $logo_link = 'mailto:hello@phktopdeals.com'; // Spécifiez le lien du logo | |
| $facebook_link = 'https://www.facebook.com/phktopdeals'; // Spécifiez le lien Facebook | |
| $linkedin_link = 'https://www.linkedin.com/in/phktopdeals/'; // Spécifiez le lien LinkedIn |
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
| Shopify objects that contain attributes that can be dynamically put on the page. For example, the product object contains an attribute called title that can be used to output the title of a product. | |
| The handle is used to access the attributes of a Liquid object. By default, it is the object’s title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, menu) has a handle. | |
| Collections & Products | |
| Collection ► | |
| all_types ► | |
| Returns a list of all the product types for a collection | |
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(){ | |
| var | |
| is_ios = /iP(ad|od|hone)/i.test(window.navigator.userAgent), | |
| is_safari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/); | |
| if ( is_ios && is_safari ) { | |
| var | |
| $html = document.documentElement, | |
| classes = $html.className.concat(' is-ios-safari'); | |
| $html.className = classes; | |
| } |
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 | |
| add_filter('the_content', function($content) { | |
| return str_replace(array("<iframe", "</iframe>"), array('<div class="iframe-container"><iframe', "</iframe></div>"), $content); | |
| }); | |
| add_filter('embed_oembed_html', function ($html, $url, $attr, $post_id) { | |
| if(strpos($html, 'youtube.com') !== false || strpos($html, 'youtu.be') !== false){ | |
| return '<div class="embed-responsive embed-responsive-16by9">' . $html . '</div>'; | |
| } else { |
NOTE this has been done properly by a guy here: https://www.stevenrombauts.be/2018/01/use-dnsmasq-instead-of-etc-hosts/
To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.