Skip to content

Instantly share code, notes, and snippets.

View edrdesigner's full-sized avatar

Eduardo Reichert edrdesigner

View GitHub Profile
@edrdesigner
edrdesigner / Adonis-ACL.md
Created March 10, 2022 21:37 — forked from maykbrito/Adonis-ACL.md
Basic step-by-step to use ACL in AdonisJS

Install

adonis install adonis-acl

Config

app.js

@edrdesigner
edrdesigner / media-query.css
Created August 12, 2019 11:36 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@edrdesigner
edrdesigner / radioTabbable.ng.js
Created April 5, 2019 14:03 — forked from jonathanconway/radioTabbable.ng.js
Angular Directive that makes individual radio-buttons focusable using the keyboard only. (Useful for accessibility, on a case-by-case basis.)
/**
* @ngdoc directive
* @name radioTabbable
* @requires none
* @description
* Makes individual radio buttons focuseable using the TAB key.
* (By default, pressing TAB while on a radio button would have shifted focus to the next control outside of the radio group.)
* @usage
* <input type="radio" name="radioGroup" value="0" radio-tabbable="" />
* <input type="radio" name="radioGroup" value="1" radio-tabbable="" />
@edrdesigner
edrdesigner / robots.txt
Created November 7, 2018 13:19 — forked from petskratt/robots.txt
Magento robots.txt
# robots.txt for Magento 1.9.x / v1.6 2018-08-19 / Peeter Marvet
# (original version from 2015, edited in 2017 to add filter query parameter disallow samples + some wildcards,
# edited in 2018 to add query params blocking to Yandex as named User-agent does not read *)
# based on:
# http://inchoo.net/ecommerce/ultimate-magento-robots-txt-file-examples/
# http://www.byte.nl/blog/magento-robots-txt/
# https://astrio.net/blog/optimize-robots-txt-for-magento/
#
# comment and clone at https://gist.github.com/petskratt/016c9dbf159a81b9d6aa
# Keep in mind that by standard robots.txt should NOT contain empty lines, except between UA blocks!
@edrdesigner
edrdesigner / Observer.php
Created August 2, 2017 14:29 — forked from mystix/Observer.php
Delete abandoned Magento shopping carts -- see http://www.magentocommerce.com/boards/viewthread/53981/P15/
<?php
/*
To make the cleaning expired carts automatic, override cleanExpiredQuotes with the following
version which will also take care of the old active carts: app/code/core/Mage/Sales/Model/Observer.php
*/
public function cleanExpiredQuotes($schedule)
{
// extending limit

Magento Snippets

Set all categories to is_anchor 1

Find attribute_id

SELECT * FROM eav_attribute where attribute_code = 'is_anchor'

Update all of them with anchor_id from above (usually is ID 51)

UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
@edrdesigner
edrdesigner / magento-design-exception.txt
Created January 10, 2017 13:15 — forked from r-martins/magento-design-exception.txt
Magento Design Exception - Para Mobile
iP(hone|od)|(a|A)ndroid.*(m|M)(obile|ini)|(a|A)ndroid 3|BlackBerry|IEMobile|Windows Mobile|Windows Phone|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune|Googlebot-Mobile
@edrdesigner
edrdesigner / ssl-serverpilot.md
Created December 22, 2016 12:15 — forked from arjenblokzijl/ssl-serverpilot.md
How To Add SSL to ServerPilot nginx

How To Add SSL to ServerPilot nginx

Requirements

  1. Domain (i.e. example.com)
  2. Subdomain(s): (i.e. www.example.com)
  3. Username
  4. App name

Create the Certificate