Skip to content

Instantly share code, notes, and snippets.

View jabberdog's full-sized avatar
🖥️
Reporting for duty

Liam Fathers jabberdog

🖥️
Reporting for duty
View GitHub Profile
@jabberdog
jabberdog / configurable.phtml
Created February 23, 2019 12:01 — forked from bizlift/configurable.phtml
Magento configurable product default options by attribute label
Product.Config.prototype.fillSelect = Product.Config.prototype.fillSelect.wrap(function(superMethod, element){
var attributeId = element.id.replace(/[a-z]*/, '');
var attribute = this.config.attributes[attributeId];
this.config.chooseText = 'Select ' + this.config.attributes[attributeId].label;
return superMethod(element);
});
@jabberdog
jabberdog / container-layout-names.md
Created January 10, 2019 22:55 — forked from joshfortyfour/container-layout-names.md
List of container layout names in Magento 2 Community Edition
  • actions_apply_to
  • admin.scope.col.wrap
  • adminhtml.block.report.product.lowstock.grid.container
  • adminhtml.catalog.product.set.edit.wrapper
  • after.body.start
  • alert.urls
  • assign_products_container
  • available_sort_by_group
  • backend.page
  • backend.session.activity
@jabberdog
jabberdog / dump.sh
Created June 22, 2018 15:28
Dumping large MySQL files
mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz
@jabberdog
jabberdog / gist:752e20c0bf406058896d6fb1837eaa31
Created June 8, 2018 12:03
Recursively secure copy files from a remote to local
-r = recursive
-P = port
scp -r -P 2020 user@SERVER_IP:ABSOLUTE/REMOTE/PATH/TO/REMOTE/FOLDER /ABSOLUTE/PATH/TO/LOCAL/FOLDER/
@jabberdog
jabberdog / git-export
Created June 1, 2017 12:22
Git Export
git archive --format zip --output /full/path/to/zipfile.zip master
@jabberdog
jabberdog / default
Created April 26, 2017 15:24
LEMP Stack for Docker (+ phpMyAdmin)
server {
listen 80;
# this path MUST be exactly as docker-composer.fpm.volumes,
# even if it doesn't exist in this dock.
root /user/share/nginx/html;
index index.php index.html index.html;
server_name 192.168.99.100;
@jabberdog
jabberdog / html5-skeleton.php
Created April 7, 2017 13:10
HTML5 Skeleton for Templating
<!DOCTYPE html>
<html lang="">
<head>
<title>HTML5 Skeleton</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="">
<link rel="icon" type="image/png" href="">