Skip to content

Instantly share code, notes, and snippets.

View definitelynotsoftware's full-sized avatar

Dan Bergman definitelynotsoftware

  • definitivesoftware
  • Massachusetts
View GitHub Profile
<!-- Table -->
<datatable sortable
resource.bind="mold"
limit.bind="limit"
select.call="selected($event)"
columns.bind="moldColumns"
actions.bind="actions"
repository.bind="moldRepository">
</datatable>
@definitelynotsoftware
definitelynotsoftware / bonobo-git-server-interface-web.config
Last active September 18, 2017 18:53
Bonobo Git Server - Windows Auth
<!-- Bonobo Git Server Interface -->
<appSettings>
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="UserConfiguration" value="C:\inetpub\wwwroot\Bonobo.Git.Server\App_Data\config.xml" />
<add key="DefaultRepositoriesDirectory" value="C:\inetpub\wwwroot\Bonobo.Git.Server\App_Data\Repositories" />
<add key="GitPath" value="C:\inetpub\wwwroot\Bonobo.Git.Server\App_Data\Git\git.exe" />
<add key="GitServerPath" value="http://%servername%/Bonobo.Git.Server.Interface/" />
@definitelynotsoftware
definitelynotsoftware / app.router.config.js (Aurelia - simple role-based navigation using 'aurelia-authentication')
Last active March 22, 2019 05:12
Aurelia - simple role-based navigation using 'aurelia-authentication'
import {AuthenticateStep} from 'aurelia-authentication';
import {inject} from 'aurelia-framework';
import {Router} from 'aurelia-router';
import {Session} from 'services/session';
import * as log from 'toastr';
@inject(Router)
export default class {
constructor(router) {
vm.sortTable = sortTable;
vm.reverseSort = false;
vm.currentPage = 1;
vm.numPerPage = 5;
vm.maxPageSize = 5;
var defaultNumberPerPage = 5;
function sortTable(header) {
@definitelynotsoftware
definitelynotsoftware / _protractor.spec.js
Last active August 29, 2015 14:05
AngularJS Protractor tests example
describe('Sales-new quote form', function () {
var attachmentListCount = element(by.id('attachment-list-count'));
var quoteNumber = element(by.model('vm.quoteNumber'));
var dateOfRFQ = element(by.model('vm.dateOfRFQ'));
var customer = element(by.model('vm.customer'));
var customerPartNumber = element(by.model('vm.customerPartNumber'));
var customerPartNumberRevision = element(by.model('vm.customerPartNumberRevision'));
var quantity = element(by.model('vm.quantity'));
var lastSalesOrderDate = element(by.model('vm.lastSalesOrderDate'));
var lastSalesOrderNumber = element(by.model('vm.lastSalesOrderNumber'));
@definitelynotsoftware
definitelynotsoftware / AngularJS basic HTML5 File Upload.js
Last active December 13, 2019 21:52
AngularJS HTML5 File Upload
...
// using an explicit call to $scope to reference from the input type='file' onchange event.
// Also, using $scope to manually call $apply when 'attachmentList' changes - see addAttachment()
$scope.addAttachment = addAttachment;
var vm = this;
vm.removeAttachment = removeAttachment;
vm.attachmentList = [];
vm.attachment = {};
@definitelynotsoftware
definitelynotsoftware / AngularJS-Windows-Authentication.authentication.js
Last active December 4, 2019 14:31
AngularJS Windows Authentication Service using .NET Web API and Hot Towel template
angular.module('app')
.factory("authentication", ["$http", "$q", "$window", authentication]);
function authentication($http, $q, $window) {
var user;
function login() {
// check if the user already exists for this session