Skip to content

Instantly share code, notes, and snippets.

View sawilde's full-sized avatar

Shaun Wilde sawilde

View GitHub Profile
NAnt 0.91 (Build 0.91.3881.0; alpha2; 17/08/2010)
Copyright (C) 2001-2010 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///O:/opencover/default.build
Target framework: Microsoft .NET Framework 4.0
Target(s) specified: sonarqube-build
sonarqube-build:
@sawilde
sawilde / time_convert_script.sql
Last active March 2, 2019 01:49
Converting UTC to Local time on SQL
-- I acknowledge that someone showed me this and I have stolen it :)
declare @tz varchar(100) = 'AUS Eastern Standard Time';
--declare @tz varchar(100) = 'GMT Standard Time';
select id, update_time_utc as [updatedTimeUtc],
CONVERT(datetime, SWITCHOFFSET([update_time_utc], DATEPART(TZOFFSET, [update_time_utc] AT TIME ZONE @tz))) as [updatedTimeLocal]
from [your_table]
@sawilde
sawilde / updateDynomoDB.ts
Created October 8, 2021 09:31
safe update of document db by replacing all keys and values by substitutions (avoiding reserved name conflicts)
import AWS from 'aws-sdk';
export const TABLE_NAME = 'table_name_here';
export const documentClient = new AWS.DynamoDB.DocumentClient({
region: process.env.TARGET_REGION,
});
export const updateRecord = (attributes: any, key: any) => {
const map = new Map(Object.entries(attributes));
@sawilde
sawilde / docker-compose.yml
Created November 14, 2021 22:25 — forked from seanhandley/docker-compose.yml
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts: