text:
layout: page
title: John Hickman's 58th Birthday
date: 2016-05-24
author: Mary Wong
tags: weekly links, java
status: published
summary: Vivamus in varius libero. Nullam dapibus.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 12/17/2018
  endDate: 12/21/2018
  ctyhocn: EKOELHX
  groupCode: JH5B
published: true
---
Pellentesque id sem tristique, efficitur dui eu, ultrices ipsum. Suspendisse potenti. Ut id molestie nisl. Sed sed sollicitudin ante. Donec quis hendrerit felis, sit amet posuere est. Fusce sed orci eget odio sodales aliquam sit amet id dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam eget diam metus. Suspendisse eu porttitor ante.

* Nunc vehicula enim quis molestie dapibus.

Nunc quis volutpat mauris, molestie fermentum est. Vivamus nisl est, fermentum ac euismod vitae, mollis vel tortor. Nulla at neque lobortis, volutpat metus non, facilisis urna. Etiam porta metus vel iaculis volutpat. Pellentesque tincidunt orci urna, id aliquet sapien consequat in. Nam dapibus varius sapien ut scelerisque. Sed sed hendrerit felis. Nunc dignissim eros vel accumsan semper. Curabitur ut convallis mi. Etiam sollicitudin lorem a ultricies auctor. Phasellus eget nibh in mauris suscipit mollis. Vivamus sapien sapien, pharetra a tincidunt nec, volutpat eu eros.


text:
* __Features__
* __Fixes__
  - [#1274][] - fix permissions problems on certain pkg uninstalls
* __Breaking Changes__

[#1274]: https://github.com/phinze/homebrew-cask/issues/1374

## 0.19.3

* __Features__
* __Fixes__
  - [#1274][] - various fixes to prevent evil from happening during certain pkg uninstall processes
* __Breaking Changes__

[#1274]: https://github.com/phinze/homebrew-cask/issues/1247

## 0.19.2

* __Features__
* __Fixes__
  - fix bug introduced in `0.19.1` where a double-install would result in a silent uninstall of a cask
* __Breaking Changes__

## 0.19.1

* __Features__
* __Fixes__
  - [#954][] - preserve environment when running `sudo` <3 [@kdeldycke][]
  - [#1247][] - clean up on install failure; raise an explicit error when a command fail for better feedback
* __Breaking Changes__

[#954]: https://github.com/phinze/homebrew-cask/issues/954
[@kdeldycke]: https://github.com/phinze/homebrew-cask/commit/f787afdc26cb5a5b81c2d6142d93c77b7aa5d28e
[#1247]: https://github.com/phinze/homebrew-cask/issues/1247

## 0.19.0

* __Features__
  - [#602][] - support for nested containers
* __Fixes__
* __Breaking Changes__

[#602]: https://github.com/phinze/homebrew-cask/issues/602

## 0.18.3

* __Features__
* __Fixes__
  - [#1168][] - support systems that have `ln` overridden with GNU version <3 [@wenbin1989][]
  - [#1181][] - fix a small bug that could stop the check link process <3 [@andizzle][]
* __Breaking Changes__

[#1168]: https://github.com/phinze/homebrew-cask/issues/1168
[@wenbin1989]: https://github.com/wenbin1989
[#1181]: https://github.com/phinze/homebrew-cask/pull/1181
[@andizzle]: https://github.com/andizzle

## 0.18.2

* __Features__
* __Fixes__
  - [#981][] - properly handle underscores in URLs <3 [@sheerun][]
* __Breaking Changes__

[#981]: https://github.com/phinze/homebrew-cask/issues/981
[@sheerun]: https://github.com/sheerun

## 0.18.1

* __Features__
  - adds `--prefpanedir=` option to link to a different location
* __Fixes__
* __Breaking Changes__

## 0.18.0 - Preference Pane Support

* __Features__
  - adds support for Preference Pane linking
    - adds `prefpane` keyword in Cask dsl indicates a prefpane to by symlinked to `~/Library/PreferencePanes`
  - internal refactor to `Artifact` system; opens up easier implementation path to supporting additional things like widgets
* __Fixes__
* __Breaking Changes__
  - removes old `linkapps` / `unlinkapps` commands
  - `install` and `link` keywords now must reference the relative path to their artifact

## 0.17.{2,3}

* __Features__
* __Fixes__
  - Bugfixes addressing ([#1105](https://github.com/phinze/homebrew-cask/issues/1105))
* __Breaking Changes__

## 0.17.1

* __Features__
* __Fixes__
  - Fixes typo on `Tar` container, preventing tar-based Casks from being installed. ([#1083](https://github.com/phinze/homebrew-cask/issues/1083))
* __Breaking Changes__

## 0.17.0

* __Features__
  - naked pkg support
  - major internal `Container` refactor
  - Remove .DS_Store files when uninstalling packages
  - pkg uninstall: support kernel extension unloading
* __Fixes__
  - fix a few bugs around recent changes
  - require tmpdir to fix container error
  - when uninstalling pkgs; sudo chmod before examining
* __Breaking Changes__

## 0.16.{1,2}

* __Features__
* __Fixes__
  - homebrew made some changes ([#1015](https://github.com/phinze/homebrew-cask/issues/1015)) that broke our integration; this bugfix release brings us back into parity with the mothership.
* __Breaking Changes__

Thanks @billwanjohi for his work to fix this.

## 0.16.0

* __Features__
  - Adds ability to install a cask directly from a URL:
    `brew cask install http://example.com/casks/my-personal-app.rb`
* __Fixes__
  - Fixes overzealous cask create name matching
* __Breaking Changes__

## 0.15.0

* __Features__
  - Adds `.pkg` install/uninstall support
* __Fixes__
* __Breaking Changes__

redpajama_set_name: RedPajamaGithub


text: sudo ./.backup-prune.sh


text:
#region License Header

#endregion License Header

namespace Quantler.Data.DataFile
{
    public enum DataFileType
    {
        /// <summary>
        /// Invalid data file
        /// </summary>
        Invalid = 0,

        /// <summary>
        /// Correct data file
        /// </summary>
        DAT
    }
}


text:
namespace DD.Cloud.OctopusDeploy.Powershell.Contracts
{
    using System.Collections.Generic;

    /// <summary>
    /// The data contract for a releases
    /// </summary>
    public class Releases
    {
        public string ItemType
        {
            get;
            set;
        }

        public bool IsStale
        {
            get;
            set;
        }

        public int TotalResults
        {
            get;
            set;
        }

        public int ItemsPerPage
        {
            get;
            set;
        }
        public List<Release> Items
        {
            get;
            set;
        }
    }
}


text:
<?php

namespace Tymon\JWTAuth\Test\Validators;

use Mockery;
use Tymon\JWTAuth\Validators\PayloadValidator;

class PayloadValidatorTest extends \PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $this->validator = new PayloadValidator();
    }

    /** @test */
    public function it_should_return_true_when_providing_a_valid_payload()
    {
        $payload = [
            'iss' => 'http://example.com',
            'iat' => time(),
            'nbf' => time(),
            'exp' => time() + 3600,
            'sub' => 1,
            'jti' => 'foo'
        ];

        $this->assertTrue($this->validator->isValid($payload));
    }

    /** @test */
    public function it_should_throw_an_exception_when_providing_an_expired_payload()
    {
        $this->setExpectedException('Tymon\JWTAuth\Exceptions\TokenExpiredException');

        $payload = [
            'iss' => 'http://example.com',
            'iat' => time() - 3660,
            'nbf' => time() - 3660,
            'exp' => time() - 1440,
            'sub' => 1,
            'jti' => 'foo'
        ];

        $this->validator->check($payload);
    }

    /** @test */
    public function it_should_throw_an_exception_when_providing_an_invalid_nbf_claim()
    {
        $this->setExpectedException('Tymon\JWTAuth\Exceptions\TokenInvalidException');

        $payload = [
            'iss' => 'http://example.com',
            'iat' => time() - 3660,
            'nbf' => time() + 3660,
            'exp' => time() + 1440,
            'sub' => 1,
            'jti' => 'foo'
        ];

        $this->validator->check($payload);
    }

    /** @test */
    public function it_should_throw_an_exception_when_providing_an_invalid_iat_claim()
    {
        $this->setExpectedException('Tymon\JWTAuth\Exceptions\TokenInvalidException');

        $payload = [
            'iss' => 'http://example.com',
            'iat' => time() + 3660,
            'nbf' => time() - 3660,
            'exp' => time() + 1440,
            'sub' => 1,
            'jti' => 'foo'
        ];

        $this->validator->check($payload);
    }

    /** @test */
    public function it_should_throw_an_exception_when_providing_an_invalid_payload()
    {
        $this->setExpectedException('Tymon\JWTAuth\Exceptions\TokenInvalidException');

        $payload = [
            'iss' => 'http://example.com',
            'sub' => 1
        ];

        $this->validator->check($payload);
    }

    /** @test */
    public function it_should_throw_an_exception_when_providing_an_invalid_expiry()
    {
        $this->setExpectedException('Tymon\JWTAuth\Exceptions\TokenInvalidException');

        $payload = [
            'iss' => 'http://example.com',
            'iat' => time() - 3660,
            'exp' => 'foo',
            'sub' => 1,
            'jti' => 'foo'
        ];

        $this->validator->check($payload);
    }
}


text:
// ----------------------------------------------------------------------------------
// <copyright file="Database.cs" company="NMemory Team">
//     Copyright (C) 2012-2014 NMemory Team
//
//     Permission is hereby granted, free of charge, to any person obtaining a copy
//     of this software and associated documentation files (the "Software"), to deal
//     in the Software without restriction, including without limitation the rights
//     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//     copies of the Software, and to permit persons to whom the Software is
//     furnished to do so, subject to the following conditions:
//
//     The above copyright notice and this permission notice shall be included in
//     all copies or substantial portions of the Software.
//
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//     THE SOFTWARE.
// </copyright>
// ----------------------------------------------------------------------------------

namespace NMemory
{
    using System;
    using NMemory.Modularity;
    using NMemory.StoredProcedures;
    using NMemory.Tables;

    /// <summary>
    /// Represents an NMemory database instance.
    /// </summary>
    public class Database : IDatabase
    {
        private IDatabaseEngine databaseEngine;
        private StoredProcedureCollection storedProcedures;
        private TableCollection tables;

        /// <summary>
        /// Initializes a new instance of the <see cref="Database" /> class.
        /// </summary>
        public Database() : this(new DefaultDatabaseComponentFactory())
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Database" /> class with the specified database engine factory..
        /// </summary>
        /// <param name="databaseComponentFactory">The database component factory.</param>
        /// <exception cref="System.ArgumentNullException"><paramref name="databaseComponentFactory"/> is null.</exception>
        public Database(IDatabaseComponentFactory databaseComponentFactory)
        {
            if (databaseComponentFactory == null)
            {
                throw new ArgumentNullException("databaseComponentFactory");
            }

            this.databaseEngine = new DefaultDatabaseEngine(databaseComponentFactory, this);
            this.storedProcedures = new StoredProcedureCollection(this);
            this.tables = new TableCollection(this);
        }

        /// <summary>
        /// Gets the collection of stored procedures contained by the database
        /// </summary>
        public StoredProcedureCollection StoredProcedures
        {
            get { return this.storedProcedures; }
        }

        /// <summary>
        /// Gets the collection of tables contained by the database.
        /// </summary>
        /// <value>
        /// A collection of tables.
        /// </value>
        public TableCollection Tables
        {
            get { return this.tables; }
        }

        /// <summary>
        /// Gets the database engine.
        /// </summary>
        /// <value>
        /// The database engine.
        /// </value>
        public IDatabaseEngine DatabaseEngine
        {
            get { return this.databaseEngine; }
        }
    }
}


text:
require 'spec_helper'

describe 'CF Python Buildpack' do
  subject(:app) { Machete.deploy_app(app_name) }
  let(:browser) { Machete::Browser.new(app) }

  context 'with cached buildpack dependencies', :cached do
    context 'app has dependencies' do
      context 'with Python 2' do
        let(:app_name) { 'flask_web_app' }

        specify do
          expect(app).to be_running(60)

          browser.visit_path('/')
          expect(browser).to have_body('Hello, World!')

          expect(app.host).not_to have_internet_traffic
        end
      end

      context 'with Python 3' do
        let(:app_name) { 'flask_web_app_python_3' }

        specify do
          expect(app).to be_running(60)

          browser.visit_path('/')
          expect(browser).to have_body('Hello, World!')

          expect(app.host).not_to have_internet_traffic
        end
      end
    end

    context 'Warning when pip has mercurial dependencies' do
      let(:log_file) { File.open('log/integration.log', 'r') }
      let(:app_name) { 'mercurial_requirements' }

      before do
        log_file.readlines
      end

      specify do
        expect(app).not_to be_running(0)
        statement_appearances = log_file.readlines.join.scan 'Cloud Foundry does not support Pip Mercurial dependencies while in offline-mode. Vendor your dependencies if they do not work.'
        expect(statement_appearances.count).to be 1
      end
    end
  end

  context 'without cached buildpack dependencies', :uncached do
    context 'app has dependencies' do
      context 'with Python 2' do
        let(:app_name) { 'flask_web_app' }

        specify do
          expect(app).to be_running(60)

          browser.visit_path('/')
          expect(browser).to have_body('Hello, World!')
        end
      end

      context 'with Python 3' do
        let(:app_name) { 'flask_web_app_python_3' }

        specify do
          expect(app).to be_running(60)

          browser.visit_path('/')
          expect(browser).to have_body('Hello, World!')
        end
      end
    end

    context 'app has no dependencies' do
      let(:app_name) { 'flask_web_app_not_vendored' }

      specify do
        expect(app).to be_running(60)

        browser.visit_path('/')
        expect(browser).to have_body('Hello, World!')
      end
    end
  end
end


text:
// Copyright (C) Pash Contributors. License: GPL/BSD. See https://github.com/Pash-Project/Pash/
using System;
using System.Runtime.Serialization;

namespace System.Management.Automation
{
    [Serializable]
    public class SetValueException : ExtendedTypeSystemException
    {
        public SetValueException()
            : base(typeof(SetValueException).FullName)
        {
        }

        public SetValueException(string message)
            : base(message)
        {
        }

        protected SetValueException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public SetValueException(string message, Exception innerException)
            : base(message, innerException)
        {
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="CoreNLP-to-HTML.xsl" type="text/xsl"?>
<root>
  <document>
    <sentences>
      <sentence id="1">
        <tokens>
          <token id="1">
            <word>a</word>
            <lemma>a</lemma>
            <CharacterOffsetBegin>0</CharacterOffsetBegin>
            <CharacterOffsetEnd>1</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="2">
            <word>unit</word>
            <lemma>unit</lemma>
            <CharacterOffsetBegin>2</CharacterOffsetBegin>
            <CharacterOffsetEnd>6</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="3">
            <word>of</word>
            <lemma>of</lemma>
            <CharacterOffsetBegin>7</CharacterOffsetBegin>
            <CharacterOffsetEnd>9</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="4">
            <word>measurement</word>
            <lemma>measurement</lemma>
            <CharacterOffsetBegin>10</CharacterOffsetBegin>
            <CharacterOffsetEnd>21</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="5">
            <word>of</word>
            <lemma>of</lemma>
            <CharacterOffsetBegin>22</CharacterOffsetBegin>
            <CharacterOffsetEnd>24</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="6">
            <word>time</word>
            <lemma>time</lemma>
            <CharacterOffsetBegin>25</CharacterOffsetBegin>
            <CharacterOffsetEnd>29</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="7">
            <word>or</word>
            <lemma>or</lemma>
            <CharacterOffsetBegin>30</CharacterOffsetBegin>
            <CharacterOffsetEnd>32</CharacterOffsetEnd>
            <POS>CC</POS>
          </token>
          <token id="8">
            <word>of</word>
            <lemma>of</lemma>
            <CharacterOffsetBegin>33</CharacterOffsetBegin>
            <CharacterOffsetEnd>35</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="9">
            <word>angle</word>
            <lemma>angle</lemma>
            <CharacterOffsetBegin>36</CharacterOffsetBegin>
            <CharacterOffsetEnd>41</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="10">
            <word>wrench</word>
            <lemma>wrench</lemma>
            <CharacterOffsetBegin>42</CharacterOffsetBegin>
            <CharacterOffsetEnd>48</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
        </tokens>
        <parse>(ROOT (NP (NP (NP (DT a) (NN unit)) (PP (IN of) (NP (NP (NN measurement)) (PP (IN of) (NP (NN time)))))) (CC or) (PP (IN of) (NP (NN angle) (NN wrench))))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="2">unit</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">unit</governor>
            <dependent idx="1">a</dependent>
          </dep>
          <dep type="prep">
            <governor idx="2">unit</governor>
            <dependent idx="3">of</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="3">of</governor>
            <dependent idx="4">measurement</dependent>
          </dep>
          <dep type="prep">
            <governor idx="4">measurement</governor>
            <dependent idx="5">of</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="5">of</governor>
            <dependent idx="6">time</dependent>
          </dep>
          <dep type="cc">
            <governor idx="2">unit</governor>
            <dependent idx="7">or</dependent>
          </dep>
          <dep type="conj">
            <governor idx="2">unit</governor>
            <dependent idx="8">of</dependent>
          </dep>
          <dep type="nn">
            <governor idx="10">wrench</governor>
            <dependent idx="9">angle</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="8">of</governor>
            <dependent idx="10">wrench</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="2">unit</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">unit</governor>
            <dependent idx="1">a</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="2">unit</governor>
            <dependent idx="4">measurement</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="4">measurement</governor>
            <dependent idx="6">time</dependent>
          </dep>
          <dep type="conj_or">
            <governor idx="2">unit</governor>
            <dependent idx="8">of</dependent>
          </dep>
          <dep type="nn">
            <governor idx="10">wrench</governor>
            <dependent idx="9">angle</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="8">of</governor>
            <dependent idx="10">wrench</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="2">unit</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">unit</governor>
            <dependent idx="1">a</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="2">unit</governor>
            <dependent idx="4">measurement</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="4">measurement</governor>
            <dependent idx="6">time</dependent>
          </dep>
          <dep type="conj_or">
            <governor idx="2">unit</governor>
            <dependent idx="8">of</dependent>
          </dep>
          <dep type="nn">
            <governor idx="10">wrench</governor>
            <dependent idx="9">angle</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="8">of</governor>
            <dependent idx="10">wrench</dependent>
          </dep>
        </dependencies>
      </sentence>
    </sentences>
  </document>
</root>


text:
const assert = require('assert')
const fs = require('fs');
//const fetchMock = require('fetch-mock')

//const API_JSON_RESPONSE = JSON.parse(fs.readFileSync(__dirname+ '/fixtures/forecast-api-response.json', 'utf8'))

module.exports = {
  // beforeEach : function() {
  //   fetchMock.get('*', {})
  //   console.log("mocking fetch")
  // },

  // afterEach: function() {
  //   fetchMock.restore()
  // },

  'Get forecast' : function (client) {
    client
      .url(client.launchUrl)
      .waitForElementVisible('[data-reactroot]', 1000) //Ensure React has bootstrap
      .assert.title('Weather forecast App')
      .assert.containsText('h1','London')
      .pause(1000) //Hopefully enough for the results to arrive, this wouldn't happen with a mock server
      .click('#day-selector li:nth-child(2)')
      .pause(500)
      .elements('css selector', '#forecast-by-day > div > div', function (result) {
        client.assert.equal(result.value.length, 8, 'All forecast for tomorrow are present')
      })
      .end()
  },

  'Type hello' : function (client) {
    client
      .url(client.launchUrl)
      .waitForElementVisible('[data-reactroot]', 1000) //Ensure React has bootstrap
      .setValue('input[type=text]', ['Hello', client.Keys.ENTER])
      .pause(1000) //Allow the "AI" to answer
      .assert.containsText('#answer','Hello to you')
      .end()
  }
}


text:
 sap.ui.define([
	'sap/ui/core/mvc/ControllerExtension'
	// ,'sap/ui/core/mvc/OverrideExecution'
],
function(
	ControllerExtension
	// ,OverrideExecution
) {
	"use strict";
	return ControllerExtension.extend("{{controllerExtensionName}}", {
		// metadata: {
		// 	// extension can declare the public methods
		// 	// in general methods that start with "_" are private
		// 	methods: {
		// 		publicMethod: {
		// 			public: true /*default*/ ,
		// 			final: false /*default*/ ,
		// 			overrideExecution: OverrideExecution.Instead /*default*/
		// 		},
		// 		finalPublicMethod: {
		// 			final: true
		// 		},
		// 		onMyHook: {
		// 			public: true /*default*/ ,
		// 			final: false /*default*/ ,
		// 			overrideExecution: OverrideExecution.After
		// 		},
		// 		couldBePrivate: {
		// 			public: false
		// 		}
		// 	}
		// },

		// // adding a private method, only accessible from this controller extension
		// _privateMethod: function() {},
		// // adding a public method, might be called from or overridden by other controller extensions as well
		// publicMethod: function() {},
		// // adding final public method, might be called from, but not overridden by other controller extensions as well
		// finalPublicMethod: function() {},
		// // adding a hook method, might be called by or overridden from other controller extensions
		// // override these method does not replace the implementation, but executes after the original method
		// onMyHook: function() {},
		// // method public per default, but made private via metadata
		// couldBePrivate: function() {},
		// // this section allows to extend lifecycle hooks or override public methods of the base controller
		// override: {
		// 	/**
		// 	 * Called when a controller is instantiated and its View controls (if available) are already created.
		// 	 * Can be used to modify the View before it is displayed, to bind event handlers and do other one-time initialization.
		// 	 * @memberOf {{controllerExtensionName}}
		// 	 */
		// 	onInit: function() {
		// 	},

		// 	/**
		// 	 * Similar to onAfterRendering, but this hook is invoked before the controller's View is re-rendered
		// 	 * (NOT before the first rendering! onInit() is used for that one!).
		// 	 * @memberOf {{controllerExtensionName}}
		// 	 */
		// 	onBeforeRendering: function() {
		// 	},

		// 	/**
		// 	 * Called when the View has been rendered (so its HTML is part of the document). Post-rendering manipulations of the HTML could be done here.
		// 	 * This hook is the same one that SAPUI5 controls get after being rendered.
		// 	 * @memberOf {{controllerExtensionName}}
		// 	 */
		// 	onAfterRendering: function() {
		// 	},

		// 	/**
		// 	 * Called when the Controller is destroyed. Use this one to free resources and finalize activities.
		// 	 * @memberOf {{controllerExtensionName}}
		// 	 */
		// 	onExit: function() {
		// 	},

		// 	// override public method of the base controller
		// 	basePublicMethod: function() {
		// 	}
		// }
	});
});


text:
'use strict';

angular
  .module('openshiftConsole')
  .controller('MembershipController',
    function(
      $filter,
      $location,
      $routeParams,
      $scope,
      $timeout,
      $uibModal,
      APIService,
      AuthService,
      AuthorizationService,
      DataService,
      ProjectsService,
      MembershipService,
      NotificationsService,
      RoleBindingsService,
      RolesService) {

      var requestContext;
      var projectName = $routeParams.project;
      var humanizeKind = $filter('humanizeKind');
      var annotation = $filter('annotation');
      var canI = $filter('canI');

      var serviceAccountVersion = APIService.getPreferredVersion('serviceaccounts');
      $scope.roleBindingsVersion = APIService.getPreferredVersion('rolebindings');

      var allRoles = [];

      var messages = {
        notice: {
          yourLastRole: _.template('Removing the role "<%= roleName %>" may completely remove your ability to see this project.')
        },
        warning: {
          serviceAccount: _.template('Removing a system role granted to a service account may cause unexpected behavior.')
        },
        remove: {
          areYouSure: {
            html: {
              subject: _.template('Are you sure you want to remove <%- roleName %> from the <%- kindName %> <%- subjectName %>?'),
              self: _.template('Are you sure you want to remove <%- roleName %> from <%- subjectName %> (you)?')
            }
          },
          success: _.template('The role "<%= roleName %>" was removed from "<%= subjectName %>".'),
          error: _.template('The role "<%= roleName %>" was not removed from "<%= subjectName %>".')
        },
        update: {
          subject: {
            success: _.template('The role "<%= roleName %>" was granted to "<%= subjectName %>".'),
            error: _.template('The role "<%= roleName %>" could not be granted to "<%= subjectName %>".'),
            exists: _.template('The role "<%= roleName %>" has already been granted to "<%= subjectName %>".')
          }
        }
      };

      var showToast = function(type, message, details) {
        NotificationsService.addNotification({
          type: type,
          message: message,
          details: details
        });
      };

      var resetForm = function() {
        $scope.disableAddForm = false;
        $scope.newBinding.name = '';
        $scope.newBinding.namespace = projectName;
        $scope.newBinding.newRole = null;
      };

      var refreshServiceAccountsList = function(ctx) {
        DataService
          .list(serviceAccountVersion, ctx)
          .then(function(resp) {
            var serviceAccounts = _.keys(resp.by('metadata.name')).sort();
            angular.extend($scope, {
              serviceAccounts: serviceAccounts,
              refreshServiceAccounts: function(search) {
                if(search && !_.includes($scope.serviceAccounts, search)) {
                  $scope.serviceAccounts = [search].concat(serviceAccounts);
                } else {
                  $scope.serviceAccounts = serviceAccounts;
                }
              }
            });
          });
      };

      var refreshRoleBindingList = function(toUpdateOnError) {
        DataService
          .list($scope.roleBindingsVersion, requestContext, null , {
            errorNotification: false
          })
          .then(function(resp) {
            angular.extend($scope, {
              canShowRoles: true,
              roleBindings: resp.by('metadata.name'),
              subjectKindsForUI: MembershipService.mapRolebindingsForUI(resp.by('metadata.name'), allRoles)
            });
            resetForm();
          }, function() {
            // if the request errors but we have an object, we can at least update in place
            if(toUpdateOnError) {
              $scope.roleBindings[toUpdateOnError.metadata.name] = toUpdateOnError;
              $scope.subjectKindsForUI = MembershipService.mapRolebindingsForUI($scope.roleBindings, allRoles);
            }
            resetForm();
          });
      };

      var createBinding = function(role, newSubject) {
        $scope.disableAddForm = true;
        RoleBindingsService
          .create(role, newSubject, projectName, requestContext)
          .then(function() {
            refreshRoleBindingList();
            showToast('success', messages.update.subject.success({
              roleName: role.metadata.name,
              subjectName: newSubject.name
            }));
          }, function(err) {
            resetForm();
            refreshRoleBindingList();
            showToast('error', messages.update.subject.error({
              roleName: role.metadata.name,
              subjectName: newSubject.name
            }), $filter('getErrorDetails')(err));
          });
      };

      var updateBinding = function(rb, newSubject, projectName) {
        $scope.disableAddForm = true;
        RoleBindingsService
          .addSubject(rb, newSubject, projectName, requestContext)
          .then(function() {
            refreshRoleBindingList();
            showToast('success', messages.update.subject.success({
              roleName: rb.roleRef.name,
              subjectName: newSubject.name
            }));
          }, function(err) {
            resetForm();
            refreshRoleBindingList();
            showToast('error', messages.update.subject.error({
              roleName: rb.roleRef.name,
              subjectName: newSubject.name
            }), $filter('getErrorDetails')(err));
          });
      };

      var selectedTab = {};
      if($routeParams.tab) {
        selectedTab[$routeParams.tab] = true; // ex: tab=Group for Groups, pluralized in the template
      }

      var subjectKinds = MembershipService.getSubjectKinds();

      // initial scope setup
      angular.extend($scope, {
        selectedTab: selectedTab,
        projectName: projectName,
        forms: {},
        subjectKinds: subjectKinds,
        newBinding: {
          role: '',
          kind: $routeParams.tab || 'User',
          name: ''
        },
        toggleEditMode: function() {
          resetForm();
          $scope.mode.edit = !$scope.mode.edit;
        },
        mode: {
          edit: false
        },
        selectTab: function(selected) {
          $scope.newBinding.kind = selected;
          $scope.newBinding.name = '';
        }
      });

      // filter functions not generic enough to be created as standard filters
      angular.extend($scope, {
        excludeExistingRoles: function(subjectRoles) {
          return function(role) {
            return !_.some(subjectRoles, {kind: role.kind, metadata: {name: role.metadata.name}});
          };
        },
        roleHelp: function(role) {
          if(!role) {
            return;
          }
          // NOTE: hiding tooltip entirely for now, until descriptions merge:
          // https://github.com/openshift/origin/pull/11328
          // the tooltip will still work if roles are manually annotated
          var noInfoMessage = ''; // prev: 'There is no additional information about this role.';
          var namespace = _.get(role, 'metadata.namespace');
          var name = _.get(role, 'metadata.name');
          var prefix = namespace ? (namespace + ' / ' + name + ': ') : '';
          return role ?
                  prefix + (annotation(role, 'description') || noInfoMessage) :
                  noInfoMessage;
        }
      });

      var createModalScope = function(subjectName, kind, roleName, currentUserName) {
        var modalScope = {
          title: 'Confirm Removal',
          alerts: {},
          detailsMarkup: messages.remove.areYouSure.html.subject({
            roleName: roleName,
            kindName: humanizeKind(kind),
            subjectName:  subjectName
          }),
          okButtonText: 'Remove',
          okButtonClass: 'btn-danger',
          cancelButtonText: 'Cancel'
        };
        if(_.isEqual(subjectName, currentUserName)) {
          modalScope.detailsMarkup = messages.remove.areYouSure.html.self({
            roleName: roleName,
            subjectName: subjectName
          });
          if(MembershipService.isLastRole($scope.user.metadata.name, $scope.roleBindings)) {
            modalScope.alerts['currentUserLabelRole'] = {
              type: 'error',
              message: messages.notice.yourLastRole({roleName: roleName})
            };
          }
        }
        if(_.isEqual(kind, 'ServiceAccount') && _.startsWith(roleName, 'system:')) {
          modalScope.alerts['editingServiceAccountRole'] = {
            type: 'error',
            message: messages.warning.serviceAccount()
          };
        }
        return modalScope;
      };

      AuthService
        .withUser()
        .then(function(resp) {
          $scope.user = resp;
        });

      ProjectsService.list()
        .then(function(resp) {
          var projects = _.keys(resp.by('metadata.name')).sort();
          angular.extend($scope, {
            projects: projects,
            selectProject: function(projectName) {
              $scope.newBinding.name = '';
              refreshServiceAccountsList({
                namespace: projectName
              });
            },
            refreshProjects: function(search) {
              if(search && !_.includes($scope.projects, search)) {
                $scope.projects = [search].concat(projects);
              } else {
                $scope.projects = projects;
              }
            }
          });
        });

      ProjectsService
        .get($routeParams.project)
        .then(_.spread(function(project, context) {
          requestContext = context;
          refreshRoleBindingList();
          refreshServiceAccountsList(requestContext);

          angular.extend($scope, {
            project: project,
            subjectKinds: subjectKinds,
            canUpdateRolebindings: canI('rolebindings', 'update', projectName),
            confirmRemove: function(subjectName, kindName, roleName, namespace) {

              var redirectToProjectList = null;
              var modalScope = createModalScope(subjectName, kindName, roleName, $scope.user.metadata.name);
              if(_.isEqual(subjectName, $scope.user.metadata.name)) {
                if(MembershipService.isLastRole($scope.user.metadata.name, $scope.roleBindings)) {
                  redirectToProjectList = true;
                }
              }
              $uibModal.open({
                templateUrl: 'views/modals/confirm.html',
                controller: 'ConfirmModalController',
                resolve: {
                  modalConfig: function() {
                    return modalScope;
                  }
                }
              })
              .result.then(function() {
                RoleBindingsService
                  .removeSubject(subjectName, roleName, namespace, $scope.roleBindings, requestContext)
                  .then(function(updateRolebinding) {
                    if(redirectToProjectList) {
                      $location.url("catalog");
                    } else {
                      AuthorizationService
                        .getProjectRules(projectName, true)
                        .then(function() {
                          refreshRoleBindingList(updateRolebinding[0]);
                          // test if the current user can still edit roles.
                          // if not, remove permissions & exit edit mode.
                          var canEdit = canI('rolebindings', 'update', projectName);
                          angular.extend($scope, {
                            canUpdateRolebindings: canEdit,
                            mode: {
                              edit: $scope.mode.edit ? canEdit : false
                            }
                          });
                        });
                      showToast('success', messages.remove.success({
                        roleName: roleName,
                        subjectName: subjectName
                      }));
                    }
                  }, function(err) {
                    showToast('error', messages.remove.error({
                      roleName: roleName,
                      subjectName: subjectName
                    }), $filter('getErrorDetails')(err));
                  });
              });
            },
            // subjectNamespace is only needed for service accounts, thus it is last and optional
            addRoleTo:function(subjectName, subjectKind, role, subjectNamespace) {
              var subject = {
                name: subjectName,
                kind: subjectKind
              };
              if(subjectKind === 'ServiceAccount') {
                subject.namespace = subjectNamespace;
              }
              // TODO (bpeterse): future. Role/ClusterRole roleRef disambiguation
              // Edge case a user creates a local Role with same name as ClusterRole,
              // roleRef doesn't necessarily contain namespace. There may be a way to
              // infer this, but isn't clear at the moment.  Will fast-follow PR if
              // a good solution is found.
              var rolebindingToUpdate = _.find($scope.roleBindings, {roleRef: {name: role.metadata.name}});
              if(rolebindingToUpdate && _.some(rolebindingToUpdate.subjects, subject)) {
                showToast('error', messages.update.subject.exists({
                  roleName: role.metadata.name,
                  subjectName: subjectName
                }));
              } else if(rolebindingToUpdate) {
                updateBinding(rolebindingToUpdate, subject, subjectNamespace);
              } else {
                createBinding(role, subject, subjectNamespace);
              }
            }
          });

          // both clusterRoles and local roles are needed, though local are rare
          RolesService
            .listAllRoles(requestContext, {
              errorNotification: false
            })
            .then(function(resp) {
              // TODO: this should be by UID, not by Kind-Name, would be less janky.
              // The only catch is matching them up w/Rolebindings, which do not have
              // the UID
              allRoles = MembershipService
                          .mapRolesForUI(
                            _.head(resp).by('metadata.name'),
                            _.last(resp).by('metadata.name'));
              var sortedRoles = MembershipService.sortRoles(allRoles);
              var filteredRoles = MembershipService.filterRoles(allRoles);
              var includesRole = function(roleName, roles) {
                return _.some(roles, { metadata: { name: roleName } });
              };
              refreshRoleBindingList();
              angular.extend($scope, {
                toggle: {
                  roles: false
                },
                filteredRoles: filteredRoles,
                toggleRoles: function() {
                  $scope.toggle.roles = !$scope.toggle.roles;
                  if($scope.toggle.roles) {
                    $scope.filteredRoles = sortedRoles;
                  } else {
                    $scope.filteredRoles = filteredRoles;
                    if(!includesRole($scope.newBinding.role, filteredRoles)) {
                      $scope.newBinding.role = null;
                    }
                  }
                }
              });
            });

        }));
    });


text:
module Rubby
  module AST
    class SimpleLiteral
      attr_accessor :value

      def initialize(value=nil)
        self.value = value
      end
    end
  end
end