Skip to content

Instantly share code, notes, and snippets.

View ArronKing's full-sized avatar

Arron King ArronKing

View GitHub Profile
@ArronKing
ArronKing / supervisord.conf
Created September 15, 2021 08:31
Sample supervisord config file for Amazon Linux 2
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
; - Quotes around values are not supported, except in the case of
; the environment= options as shown below.
@ArronKing
ArronKing / supervisord
Created September 15, 2021 08:29
/etc/init.d/supervisord - init script for supervisord on Amazon Linux 2
#!/bin/bash
#
# supervisord Startup script for the Supervisor process control system
#
# Author: Mike McGrath <mmcgrath@redhat.com> (based off yumupdatesd)
# Jason Koppe <jkoppe@indeed.com> adjusted to read sysconfig,
# use supervisord tools to start/stop, conditionally wait
# for child processes to shutdown, and startup later
# Erwan Queffelec <erwan.queffelec@gmail.com>
# make script LSB-compliant
<?php
namespace Arrow\Wysiwyg\Plugin;
use Magento\Framework\DataObject;
class WysiwygConfig
{
public function afterGetConfig($subject, DataObject $result)
{
<?php
namespace Arrow\Wysiwyg\Plugin;
use Magento\Framework\DataObject;
class WysiwygConfig
{
public function afterGetConfig($subject, DataObject $result)
{
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="\Magento\Cms\Model\Wysiwyg\Config">
<plugin name="add_wysiwyg_data" type="\Arrow\Wysiwyg\Plugin\WysiwygConfig" sortOrder="10" />
</type>
</config>
@ArronKing
ArronKing / Clipboard.js
Last active February 20, 2019 16:19 — forked from rproenca/Clipboard.js
Copy text to clipboard using Javascript. It works on Safari (iOS) and other browsers.
window.Clipboard = (function(window, document, navigator) {
var textArea,
copy;
function isOS() {
return navigator.userAgent.match(/ipad|iphone/i);
}
function createTextArea(text) {
textArea = document.createElement('textArea');
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com *.example.com
DocumentRoot /var/www/magento/example.com
<Directory /var/www/magento/example.com>
Options None
Options +FollowSymLinks
AllowOverride All
@ArronKing
ArronKing / _mixins.scss
Created April 11, 2014 14:20
SASS media query mixin
@mixin MQ($size) {
@media only screen and (min-width: $size) { @content; }
}
@ArronKing
ArronKing / post-receive
Created March 13, 2014 16:34
Basic post-receive git hook
#!/bin/sh
cd ../
env -i git reset --hard
#!/bin/bash
#We changed the data directory to use "$HOME/Data" instead of "$HOME/.mysql-clh-data"
DATA_DIR="$HOME/Data"
#Uncomment to change the mysql user, defaults to root
#MYSQL_USER="admin"
#Uncomment to change the mysql host, defaults to localhost
#MYSQL_HOST="mysql.local"
#Uncomment to change the password, defaults to ""
#MYSQL_PASS="changeme"