#!/bin/bash
# NVM needs the ability to modify your current shell session's env vars,
# which is why it's a sourced function
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
| from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator | |
| # First we create a little helper function, becase we will potentially have many PaginatedTypes | |
| # and we will potentially want to turn many querysets into paginated results: | |
| def get_paginator(qs, page_size, page, paginated_type, **kwargs): | |
| p = Paginator(qs, page_size) | |
| try: | |
| page_obj = p.page(page) | |
| except PageNotAnInteger: |
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
| // /extensions/users-permissions | |
| "use strict"; | |
| /** | |
| * Module dependencies. | |
| */ | |
| // Public node modules. | |
| const _ = require("lodash"); | |
| const request = require("request"); |
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
| #!/bin/bash | |
| # https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04 | |
| # Download the Let’s Encrypt Client | |
| cd /usr/local/sbin | |
| sudo wget https://dl.eff.org/certbot-auto | |
| sudo chmod a+x /usr/local/sbin/certbot-auto | |
| # Set Up the SSL Certificate |
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 .ddev/docker-compose.redis.yaml | |
| # ddev redis recipe file | |
| # | |
| version: '3' | |
| services: | |
| redis: # This is the service name used when running ddev commands accepting the --service flag | |
| container_name: ddev-${DDEV_SITENAME}-redis # This is the name of the container. It is recommended to follow the same name convention used in the main docker-compose.yml file. | |
| image: redis:4 |
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
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
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
| diff --git a/Block/Checkout/LayoutProcessor.php b/Block/Checkout/LayoutProcessor.php | |
| index 557f1433..2313fda5 100644 | |
| --- a/Block/Checkout/LayoutProcessor.php | |
| +++ b/Block/Checkout/LayoutProcessor.php | |
| @@ -157,15 +157,15 @@ class LayoutProcessor implements \Magento\Checkout\Block\Checkout\LayoutProcessor | |
| $elements = $this->getAddressAttributes(); | |
| $elements = $this->convertElementsToSelect($elements, $attributesToConvert); | |
| // The following code is a workaround for custom address attributes | |
| - if (isset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']['children'] | |
| - ['payment']['children'])) { |
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
| sub vcl_recv { | |
| if (! req.http.Authorization ~ "Basic dXNlcm5hbWU6cGFzc3dvcmQ=") { | |
| # This is checking for base64 encoded username:password combination | |
| return(synth(401, "Authentication required")); | |
| } | |
| unset req.http.Authorization; | |
| } |
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
| <style> | |
| body { | |
| height: 100vh; | |
| font-family: "Source Sans Pro", Roboto, Arial, sans-serif; | |
| } | |
| .wrapper { | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; |