Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| . | |
| ├── matree | |
| ├── swift | |
| │ ├── 00503_0_254.242_2013mar02 | |
| │ ├── 00546_0_ensbdasa-09aug2013 | |
| │ ├── 00553_0_ensbdpix3-09aug2013 | |
| │ ├── 00554_0_ensbdpix4-09aug2013 | |
| │ ├── 00555_0_ensbdrtr1-2013aug09 | |
| │ ├── 00557_0_ENSBDVPN1-02AUG2013 | |
| │ ├── 00558_0_ENSBDVPN2-02AUG2013 |
| <# | |
| .SYNOPSIS | |
| This is a Powershell script to dump console buffer as html to file. | |
| .DESCRIPTION | |
| This Powershell script will iterate over the current console buffer and | |
| output it as html preserving colors. | |
| .PARAMETER FilePath |
| SELECT | |
| o.name as 'TableName' , | |
| SUM ( | |
| CASE | |
| WHEN (index_id < 2) THEN row_count | |
| ELSE 0 | |
| END | |
| ) as 'RowCount', | |
| LTRIM (STR (SUM (reserved_page_count)/1024 * 8, 15, 0) + ' MB') as'Reserved MB', |
| /* @flow */ | |
| declare module 'dynamoose' { | |
| declare type Throughput = number | ({ | |
| read: number; | |
| } | { | |
| write: number; | |
| }); | |
| declare type ThroughputConfig = { | |
| throuput: Throughput; |
| // Custom made dynamoose declaration file. | |
| declare module "dynamoose" { | |
| export function local(url: string): void; | |
| export function model<DataSchema, KeySchema, ModelSchema extends Model<DataSchema>>( | |
| modelName: string, | |
| schema: Schema, | |
| options?: ModelOption | |
| ): ModelConstructor<DataSchema, KeySchema, ModelSchema>; | |
| export function setDefaults(options: ModelOption): void; |
| Simple Disk Cleanup Server "Fix" v. 1.1 | |
| Date: 5.12.2014 | |
| http://www.null-byte.org/development/missing-disc-cleanup-utility-in-windows-server-fix/ | |
| Simple batch script to copy Windows Disk Cleanup tools without the need to install the full Desktop experience on a server, which also requires a reboot. | |
| The script will attempt to detect the operating system and copy the required files (2) to the correct folder. A prompt to execute has been added in the end. | |
| Usage: | |
| 1) Extract contents of the ZIP file to the servers local disk (Any location works, except UNC paths) | |
| 2) Execute script with Admin privileges if you have UAC enabled |
| 'use strict'; | |
| var _ = require('lodash'); | |
| /** | |
| * Prepares metadata to store into database. | |
| * @param {*} obj Metadata | |
| * @return {*} | |
| */ | |
| module.exports.prepareData = function prepareData (obj) { |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| // context | |
| var mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://...'); | |
| /** | |
| * Generates Mongoose uniqueness validator | |
| * | |
| * @param string modelName | |
| * @param string field | |
| * @param boolean caseSensitive |
It's possible for a developer to create a new domain and then simply run
domain.enter(). Which then acts as a catch-all for any exception in the
future that couldn't be observed by the thrower. Allowing a module author to
intercept the exceptions of unrelated code in a different module. Preventing