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
/* Drop all non-system stored procs */ | |
DECLARE @name VARCHAR(128) | |
DECLARE @SQL VARCHAR(254) | |
SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name]) | |
WHILE @name is not null | |
BEGIN | |
SELECT @SQL = 'DROP PROCEDURE [dbo].[' + RTRIM(@name) +']' | |
EXEC (@SQL) |
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
# Delete all branches except trunk (and current - which will error out and not be deleted even if it's not trunk) | |
git branch | %{ $_.Trim() } | ?{ $_ -ne 'trunk' } | %{ git branch -D $_ } |
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
function isValidNumber (it: unknown): it is number { | |
return it != null && typeof it === 'number' && !Number.isNaN(it) | |
} |
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
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var browserSync = require('browser-sync').create(); | |
var Paths = { | |
HERE: './', | |
DIST: 'dist/', | |
CSS: './assets/css/', |
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
/// | |
/// Category to help with animating UIView instances | |
/// | |
@implementation UIView (Animation) | |
-(void)translateX:(float)x andY:(float)y | |
{ | |
CGPoint center = self.center; | |
center.x += x; | |
center.y += y; |
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
declare global { | |
namespace NodeJS { | |
interface ProcessEnv { | |
DYNAMODB_TABLE: string | |
SOCOTRA_INSTANCE_HOST_NAME: string | |
SOCOTRA_API_BASE_URI: string | |
SOCOTRA_AUTH_USERNAME: string | |
SOCOTRA_AUTH_PASSWORD: string | |
} | |
} |
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
/// <summary> | |
/// Extension methods for the system MVC controller and related classes | |
/// </summary> | |
public static class ControllerExtensions | |
{ | |
/// <summary> | |
/// Renders a view to string using the given model | |
/// </summary> | |
/// <param name="controller"></param> | |
/// <param name="viewName"></param> |
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
/** | |
* Utility class around window.sessionStorage that simplifies access and provides strong-typing | |
* */ | |
export default class StorageValue<ValueType> { | |
private key: string; | |
private storage: Storage; | |
constructor(key: string, storage: Storage = sessionStorage) { | |
this.key = key; |
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 PublicError from './PublicError'; | |
// Based catch-decorator by Enkot https://github.com/enkot/catch-decorator | |
// decorator factory function | |
export default (name: string, message?: string): any => { | |
return ( | |
target: any, | |
propertyKey: string, | |
descriptor: PropertyDescriptor, |
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
// https://webpack.js.org/loaders/raw-loader/ | |
npm install raw-loader --save-dev | |
// In webpack.config.js | |
module.exports = { | |
... | |
module: { | |
rules: [ | |
... |