Skip to content

Instantly share code, notes, and snippets.

View dnunez24's full-sized avatar

Dave Nunez dnunez24

View GitHub Profile
@vincent99
vincent99 / README.md
Created May 24, 2016 18:57
Rancher on docker-for-mac with xhyve

Install Docker for Mac (http://beta.docker.com)

Install docker-machine-driver-xhyve (https://github.com/zchee/docker-machine-driver-xhyve)

brew install docker-machine-driver-xhyve sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

Deploy the latest release

docker run -d --privileged -p 8080:8080 --name=rancher-server rancher/server:latest

or a build-master

@mfdj
mfdj / mage2_module_scaffold.sh
Created May 24, 2016 00:18
shell function to scaffold a magento2 module
<< DOC
Usae:
mage2_module_scaffold <vendor> <module>
Note:
This command is destructive — it will ovewrite app/code/<vendor>/<module>/etc/module.xml
DOC
mage2_module_scaffold() {
local vendor=$1
@bcomnes
bcomnes / git-gpg.md
Last active February 13, 2024 07:33
my version of gpg on the mac
  1. brew install gnupg, pinentry-mac (this includes gpg-agent and pinentry)

  2. Generate a key: $ gpg --gen-key

  3. Take the defaults. Whatevs

  4. Tell gpg-agent to use pinentry-mac:

    $ vim ~/.gnupg/gpg-agent.conf 
    
@cedricblondeau
cedricblondeau / ImageChooser.php
Created January 14, 2016 02:40
Image Chooser for Magento2 widgets
<?php
namespace Vendor\Module\Block\Adminhtml\Widget;
class ImageChooser extends \Magento\Backend\Block\Template
{
/**
* @var \Magento\Framework\Data\Form\Element\Factory
*/
protected $_elementFactory;
<?php
namespace Craft;
/**
* The class name is the UTC timestamp in the format of mYYMMDD_HHMMSS_pluginHandle_migrationName.
*/
class m150904_071603_inspections_DistanceText extends BaseMigration
{
/**
@joshangell
joshangell / default.vcl
Last active January 5, 2022 11:35
Varnish config for Craft
# Varnish 4.0 configuration for Craft
#
# Based on the following:
# - https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl
# - https://gist.github.com/aelvan/eba03969f91c1bd51c40
vcl 4.0;
import std;
import directors;
@ErisDS
ErisDS / style-test.md
Last active November 25, 2020 12:03
A Full and Comprehensive Style Test

Below is just about everything you'll need to style in the theme. Check the source code to see the many embedded elements within paragraphs.


Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
@tkissing
tkissing / gist:e5fa4908150c82d73131
Last active February 12, 2019 03:41
Singleton JavaScript modules that are easy to test! (Hint: Avoid object literals)
// using AMD syntax here to avoid confusion about scope and file boundaries,
// but the concept translates 1:1 to CommonJS (node/io) modules
define('badSingleton', function(require, exports, module) {
var dependency = require('dependency');
var privateState;
module.exports = {
foo: function() {
@lambtron
lambtron / shopify.md
Last active October 23, 2023 17:48
segment event tracking for shopify
title sidebar
Segment Event Tracking for Shopify
Shopify

Segment makes it simple for Shopify merchants to integrate analytics, email marketing, advertising and optimization tools. Rather than installing all your tools individually, you just install Segment once. We collect your data, translate it, and route it to any tool you want to use with the flick of a switch. Using Segment as the single platform to manage and install your third-party services will save you time and money.

The guide below explains how to install Segment in your Shopify store. All you need to get up and running is copy and paste a few snippets of code into your theme editor. (You don't have to edit the code or be versed in JavaScript.) The following guide will show you how, step by step.


# Varnish 4.0 file for our Craft CMS projects
# Based on https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl
#
# This is still work in progress, comments appreciated.
vcl 4.0;
import std;
import directors;