Skip to content

Instantly share code, notes, and snippets.

View danmo's full-sized avatar
💭
Eat -> Sleep -> Code -> Repeat

Dan Ochiana danmo

💭
Eat -> Sleep -> Code -> Repeat
  • https://www.makeen.io
  • Romania
View GitHub Profile
@danmo
danmo / fields
Last active December 5, 2019 10:18
userSchema = {
firstName,
lastName,
workspaceId: <-- eagerly loaded to worspace
}
applyAccessFilters()
regular -> 'find.books' -> you should only 'workspace.name'
fields = '// workspace.name' //'workspace'
/* eslint-disable class-methods-use-this */
import Joi from 'joi';
/**
* ENUM TYPES
*/
const OperationType = {
EQUALS: 'EQUALS',
NOT_EQUALS: 'NOT_EQUALS',
NOT_INCLUDED: 'NOT_INCLUDED',
/**
* @module sign
*/
'use strict'
const path = require('path')
const Promise = require('bluebird')
const compareVersion = require('compare-version')
@danmo
danmo / cloudSettings
Created June 26, 2017 18:35
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-06-26T18:35:40.314Z","extensionVersion":"v2.8.1"}
@danmo
danmo / 0_reuse_code.js
Created May 19, 2016 12:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
const UiSelectDisableBackspaceClearDirective = () => {
return {
restrict: 'A',
require: 'uiSelect',
link: ($scope, $element, attrs, uiSelectCtrl) => {
const shouldDisableBackspaceClear = $scope.$eval(attrs['uiSelectDisableBackspaceClear']);
if(!shouldDisableBackspaceClear) {
return;
}
Feature: Managing BEN Brands
In order to use the BEN platform, I need to be a user of the system.
Scenario: Creating a new brand when handling an external user registration request
Given I am an internal user
And I am registering an external user registration request
And I visit the client creation/edit modal or view
And I select "Add Client" button, link or icon
And I visit the client creation/edit modal or view
When I click the "Create Brand" button
Feature: Managing BEN Clients
In order to use the BEN platform, I need to be a user of the system.
Scenario: Creating a new client when handling an external user registration request
Given I am an internal user
And I am registering an external user registration request
And I visit the manage access page for that user
When I select "Add (new) Client" button, link or icon
Then I should be presented with the client creation/edit modal or view