Skip to content

Instantly share code, notes, and snippets.

View virtualize's full-sized avatar

Christoph Wieseke virtualize

  • Leipzig, Germany
View GitHub Profile
@virtualize
virtualize / gist:7642497
Last active December 29, 2015 08:19
Setup NFS for RHEL Virtual Machine on a OSX Host

Setup NFS for RHEL Virtual Machine on a OSX Host

In my case to use my RHEL virtual machine as development webserver, but be able to edit all files locally. I know there are other options, i.e. via sshfs and osxfuse, but NFS does support symlinks...

Configure Virtual Box networking

In your Virtual Box (application, not VM) configuration create a new Host-only network

IP4 Address: 192.168.56.1
IP4 Network Mask: 255.255.255.0
Enabled DHCP Server
@virtualize
virtualize / SymfonyCommand.php
Last active April 8, 2020 15:35
Symfony: call voters via decision manager in cli command
<?php
public function __construct(ManagerRegistry $doctrine, AccessDecisionManagerInterface $decisionManager)
{
parent::__construct();
$this->doctrine = $doctrine;
$this->decisionManager = $decisionManager;
}
protected function execute(InputInterface $input, OutputInterface $output)
@virtualize
virtualize / cookie-consent.html
Created November 24, 2020 13:15
Cookie consent bar example
@virtualize
virtualize / shopify-metafields.md
Last active June 8, 2021 16:47
Edit Shopify metafields in bulk editor, without an app

Metafields can be added to products, variants, collections, etc.

We add a simple bookmark to our browser that contains some javascript, called a bookmarklet. When the bookmarklet gets clicked it modifies the url and reloads the browser with it.

Create bookmarklet

  1. Create a new bookmark in your browser
  2. Enter a descriptive name of your liking
  3. Copy/paste the javascript from below into the location/url field of the bookmark