This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator'; | |
import { Connection, EntitySchema, FindConditions, ObjectType } from 'typeorm'; | |
interface UniqueValidationArguments<E> extends ValidationArguments { | |
constraints: [ | |
ObjectType<E> | EntitySchema<E> | string, | |
((validationArguments: ValidationArguments) => FindConditions<E>) | keyof E, | |
]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Author: Andrew Howard | |
# This script will copy an server image from one region to another. | |
# BE AWARE: This will incur charges for the customer. These charges | |
# can be minimized by using ServiceNet for the download and by choosing | |
# to auto-delete the Cloud Files content once the transfer is complete. | |
# Even with these precautions, the customer will be charged for storage | |
# fees in Cloud Files (for a single month) and Cloud Images (destination). | |
# Note: To use ServiceNet, this script MUST be run on a Cloud Server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('backbone', ['lib-underscore', 'lib-backbone'], function () { | |
Backbone.mixin = function (view, mixin, custom) { | |
if (custom) { | |
if (custom.events && mixin.events) { | |
mixin = _.clone(mixin) | |
_.defaults(custom.events, mixin.events) | |
} | |
_.extend(mixin, custom) | |
} | |
var source = view.prototype || view |