Skip to content

Instantly share code, notes, and snippets.

View NiklasBr's full-sized avatar

Niklas NiklasBr

View GitHub Profile
MacBook-Pro $ brew cask uninstall vlc
Error: Cask 'vlc' definition is invalid: invalid 'depends_on macos' value: ">= :lion"
MacBook-Pro $ brew cask uninstall vlc --force
Error: Cask 'vlc' definition is invalid: invalid 'depends_on macos' value: ">= :lion"
MacBook-Pro $ brew update-reset && brew update
==> Fetching /usr/local/Homebrew...
==> Resetting /usr/local/Homebrew...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to and reset branch 'master'
@NiklasBr
NiklasBr / ateles-new-brand-signature-macos-mail.md
Last active April 30, 2019 07:14
Ateles new brand – MacOS Mail.app signature

Follow these instructions to edit your signature and add it to your account.

These steps are required to avoid "garbage" markup that email clients (including Apple's Mail.app) will add to messages. They will make sure that emails with this signature does not look like they contain attachments for the benefit of your recipients.

Prepare your signature

  1. Open your favourite code editor, you can use Microsoft Visual Studio Code (but your favourite editor is Emacs, what else is there?).
  2. Copy the below file (ateles-signature.html) into a new document.
  3. Edit the HTML as you like, but avoid touching anything else in the file. If you require additional lines, use inline CSS because classes and separate style elements are not supported by multiple email clients. Also keep in mind that line breaks require the <br> tag.
  4. Save it and keep it open.
<?php
/**
* @param IEnvironment $environment
* @throws
* @return IAction
*/
public function executeOnCart(IEnvironment $environment): IAction
{
$cart = $environment->getCart();
@NiklasBr
NiklasBr / priceruletax.php
Last active February 4, 2019 14:47
Pimcore price rule tax recalculation?
<?php
namespace AppBundle\Ecommerce\Action;
use Pimcore\Bundle\EcommerceFrameworkBundle\CartManager\CartPriceModificator\Discount;
use Pimcore\Bundle\EcommerceFrameworkBundle\PricingManager\IAction;
use Pimcore\Bundle\EcommerceFrameworkBundle\PricingManager\IEnvironment;
use Pimcore\Bundle\EcommerceFrameworkBundle\Type\Decimal;
/**
$ npm rebuild
npm@6.0.0 /Users/niklas/node_modules/npm
JSONStream@1.3.2 /Users/niklas/node_modules/npm/node_modules/JSONStream
jsonparse@1.3.1 /Users/niklas/node_modules/npm/node_modules/JSONStream/node_modules/jsonparse
through@2.3.8 /Users/niklas/node_modules/npm/node_modules/JSONStream/node_modules/through
abbrev@1.1.1 /Users/niklas/node_modules/npm/node_modules/abbrev
ansi-regex@3.0.0 /Users/niklas/node_modules/npm/node_modules/ansi-regex
ansicolors@0.3.2 /Users/niklas/node_modules/npm/node_modules/ansicolors
ansistyles@0.1.3 /Users/niklas/node_modules/npm/node_modules/ansistyles
aproba@1.2.0 /Users/niklas/node_modules/npm/node_modules/aproba
$ pwd
/Users/niklas/.homebridge
$ npm rebuild
align-text@0.1.4 /Users/niklas/node_modules/align-text
kind-of@3.2.2 /Users/niklas/node_modules/align-text/node_modules/kind-of
is-buffer@1.1.6 /Users/niklas/node_modules/is-buffer
longest@1.0.1 /Users/niklas/node_modules/longest
repeat-string@1.6.1 /Users/niklas/node_modules/repeat-string
ansi-bgblack@0.1.1 /Users/niklas/node_modules/ansi-bgblack
ansi-wrap@0.1.0 /Users/niklas/node_modules/ansi-wrap

Keybase proof

I hereby claim:

  • I am niklasbr on github.
  • I am niklasbr (https://keybase.io/niklasbr) on keybase.
  • I have a public key ASCXHqCAOAeoN8T2RF4uJWTQi9qwdgYWB0bx5s01SIoAYwo

To claim this, I am signing this object:

@NiklasBr
NiklasBr / gist:0e873ae91ddc90b47ba4
Created October 15, 2015 17:51
Drupal VM terminal output
Caconym:~ niklas$ mkdir ~/Applications/drupalvm
Caconym:~ niklas$ cd Desktop/drupal-vm-master/
Caconym:drupal-vm-master niklas$ vagrant up
Bringing machine 'drupalvm' up with 'virtualbox' provider...
==> drupalvm: Box 'geerlingguy/ubuntu1404' could not be found. Attempting to find and install...
drupalvm: Box Provider: virtualbox
drupalvm: Box Version: >= 0
==> drupalvm: Loading metadata for box 'geerlingguy/ubuntu1404'
drupalvm: URL: https://atlas.hashicorp.com/geerlingguy/ubuntu1404
==> drupalvm: Adding box 'geerlingguy/ubuntu1404' (v1.0.6) for provider: virtualbox
<?php
$users = [
[
'name' => 'John Smith',
'birthday' => '1988-02-03',
],
[
'name' => 'Jane Jones',
'birthday' => '2014-07-08',