This file contains hidden or 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
# Usage: python3 dynamodb_capacity_report.py 2020-04-01 2020-05-01 | |
import csv | |
import sys | |
from datetime import datetime | |
import boto3 | |
cloudwatch = boto3.client('cloudwatch') |
This file contains hidden or 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
namespace NCron | |
{ | |
public abstract class SynchronizedCronJob<TJob> : CronJob where TJob : SynchronizedCronJob<TJob> | |
{ | |
private static readonly object SyncRoot = new object(); | |
private static bool IsRunning = false; | |
public override void Execute() | |
{ | |
var runNow = false; |
This file contains hidden or 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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Autofac; | |
using Rebus; | |
using Rebus.Bus; | |
using Rebus.Configuration; | |
namespace Rebus.Autofac |
This file contains hidden or 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
using System; | |
using System.Data; | |
using NHibernate; | |
using NHibernate.SqlTypes; | |
using NHibernate.UserTypes; | |
public class BinaryGuidType : IUserType | |
{ | |
private static readonly int[] ByteOrder = new[] { 10,11,12,13,14,15,8,9,6,7,4,5,0,1,2,3 }; | |
private static readonly SqlType[] Types = new[] { new SqlType(DbType.Binary) }; |
This file contains hidden or 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
public class DisplayNameHelper | |
{ | |
/// <summary> | |
/// Get the DataAnnotation attributed DisplayName attribute value. | |
/// </summary> | |
/// <example> | |
/// GetDisplayNameFor<VagtTyper>(x => x.Doegnvagt) ==> "Døgnvagt" | |
/// </example> | |
/// <typeparam name="TSource">The type you wish to work on</typeparam> | |
/// <typeparam name="TProp">The type of the property</typeparam> |
This file contains hidden or 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
// Or if you use binding by parameter, don't do anything at all :-) | |
public ActionResult Create(Bar bar) | |
{ | |
if (ModelState.IsValid) | |
{ | |
// Do something; | |
} | |
// Do something else; |
This file contains hidden or 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<title>Stretched image in background</title> | |
<style type="text/css"> | |
body, html { margin: 0; padding: 0 } | |
img { position:absolute; z-index:-1; width:100%; height:100% } | |
</style> | |
</head> | |
<body> |
This file contains hidden or 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
/* | |
(c) 2008, Joern Schou-Rode <[email protected]> | |
This work ‘as-is’ we provide. | |
No warranty, express or implied. | |
We’ve done our best, | |
to debug and test. | |
Liability for damages denied. | |
Permission is granted hereby, |