Skip to content

Instantly share code, notes, and snippets.

View ashsmith's full-sized avatar
:shipit:

Ash Smith ashsmith

:shipit:
View GitHub Profile
cd /to/magento/root/
modman init
modman clone https://github.com/meanbee/gmailactions.git
/Applications/MAMP/Library/bin/mysql -u [username] -p databasename < file.sql
#You will be prompted for the users password after
var disqus_config = function() {
this.callbacks.onNewComment.push(function() {
ga('send', {
'hitType': 'event', // Required.
'eventCategory': 'comments', // Required.
'eventAction': 'comment', // Required.
'eventLabel': 'New Comment'
});
});
};
@ashsmith
ashsmith / gist:524d176eaf48bfd87aab
Created February 18, 2015 16:55
Fake your user agent to look like Googlebot.
curl -A "'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)')" http://MYDOMAIN.COM/ --head
@ashsmith
ashsmith / ps_opt_p_enabled_for_alpine.sh
Created March 27, 2019 13:40 — forked from benok/ps_opt_p_enabled_for_alpine.sh
Enable "ps [-p|--pid] PID" for /bin/ps from busybox (like Alpine Linux)
#!/bin/sh
# enable "ps [-p] PID" for /bin/ps from busybox (like Alpine)
# copy this script as /usr/local/bin/ps or /usr/bin/ps, and chmod 755 it.
if [ $# == 1 ]; then
echo $1 | grep -q -E '^[0-9]+$' # number only argument
if [ $? == 0 ]; then
OPT_P=1
ARG_P=$1
fi
@ashsmith
ashsmith / Controller-Edit.php
Last active August 28, 2019 13:55
M2 module from scratch - p5 - adminhtml
<?php
namespace Ashsmith\Blog\Controller\Adminhtml\Post;
use Magento\Backend\App\Action;
class Edit extends \Magento\Backend\App\Action
{
/**
* Core registry
*

Keybase proof

I hereby claim:

  • I am ashsmith on github.
  • I am ashsmithco (https://keybase.io/ashsmithco) on keybase.
  • I have a public key ASD-2LpasgMgAYQtopgcqsXXfxiWb1RulBqaQqehaHeZMAo

To claim this, I am signing this object:

@ashsmith
ashsmith / di.xml
Last active December 9, 2019 21:38
<type name="Magento\Cms\Model\Wysiwyg\Images\Storage">
<arguments>
<argument name="extensions" xsi:type="array">
<item name="image_allowed" xsi:type="array">
<item name="svg" xsi:type="string">image/svg+xml</item>
</item>
</argument>
</arguments>
</type>