Skip to content

Instantly share code, notes, and snippets.

<?php
namespace Drupal\store_graph_upload\Plugin\Deriver;
use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldTypePluginManagerInterface;
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
@justinlevi
justinlevi / install-composer-drush.sh
Last active June 1, 2016 14:35 — forked from matthewpizza/install-composer.sh
Install Composer on Webfaction
cd $HOME
ln -s `which php56` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php56
echo -e "\n# Composer\nalias composer=\"php56 \$HOME/composer.phar\"" >> $HOME/.bash_profile
echo -e "\n# Load $HOME/bin\nexport PATH=$HOME/bin:$PATH" >> $HOME/.bash_rc
composer global require drush/drush
ln -s ~/.composer/vendor/drush/drush/drush ~/bin/composer
export DRUSH_PHP=$(which php56)
source $HOME/.bash_profile
//
// RBResizer.swift
// Locker
//
// Created by Hampton Catlin on 6/20/14.
// Copyright (c) 2014 rarebit. All rights reserved.
// Updated by Justin Winter on 11/29/15.
//
extension UIImage {
@justinlevi
justinlevi / swift-kvo-example.swift
Created November 11, 2015 21:36 — forked from correia/swift-kvo-example.swift
A quick example for how to use Foundation style KVO from Swift. (Official documentation from Apple is forthcoming.)
//
// Swift-KVO
//
// Created by Jim Correia on 6/5/14.
// Copyright (c) 2014-2015 Jim Correia. All rights reserved.
//
// Update: 6/17/2014
//
// KVOContext has gone away; use the same idiom you'd use from Objective-C for the context
//