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 math | |
class IIIFImageApi: | |
def __init__(self, json: dict): | |
if not dict: | |
return | |
self.Width = int(json.get("width")) | |
self.Height = int(json.get("height")) |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBGECvf0BEAC+uHIo8GCJaP5x7A7IYN5UunR1W1SbI5uIRkFPkmqZcEqgeu1J | |
S9PSpPhLynsrFNSQwZZVX9ksYfjSN2BMajrU5z2M5IrlSdsLGI2+s7MkGAd+l9zx | |
q5jwrmBpBliNr7tMl1kSySLQOHh3oCmzGQt8Mm/gMd1qK7LXG1W47U6XDzZhDzK8 | |
Rq1VoLCA47PDnLtRXBXMJgBM4NhXB/nwT/IYyvL1R5TU5MEEUkHLAfBQthJTP+6Z | |
LxnvuUAd9pd/Udj6ArlIn7Gi9gPBmvaEKg40q6kuihOguRoHC1oyddGlWSRKk93I | |
EON5SLeYzUADmq0LT4yBPIbpa13hW2v//7H7yCVaOU9C0aaFFfrQjdKkV0Tpx+Sr | |
RJ3rkGsgsoziyagpbInVWYt/iMm54z/L1055v4xUZ6D5Ktx+RLXait5WdwTLHqdU | |
YkIiqwpxZLyDmoh63NrhcglVdVuXlN6tZ9oAcVySK/fB7cj1qmbYCS+aMQGF/Fra |
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
FROM ubuntu:18.04 | |
# install required packages | |
RUN apt-get update && apt-get install -y \ | |
libfcgi0ldbl libjpeg8 zlib1g-dev libstdc++6 libtool cmake wget \ | |
libjpeg-dev libtiff-dev libpng-dev liblcms2-2 libmemcached-dev \ | |
lighttpd memcached git autoconf | |
# clone openjpeg | |
RUN mkdir -p /opt && cd /opt && git clone https://github.com/uclouvain/openjpeg.git |
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
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using MassTransit; | |
using NewRelic.Api.Agent; | |
/// <summary> | |
/// <see cref="IReceiveObserver"/> implementation that sends faults to NewRelic. | |
/// </summary> | |
public class NewRelicReceiveObserver : IReceiveObserver |
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
const Koa = require('koa'); | |
const app = new Koa(); | |
app.use(async (ctx, next) => { | |
console.log(`${ctx.method} ${ctx.url}`); | |
const responseCode = ctx.url.startsWith('/') ? ctx.url.substring(1) : 200; | |
const delay = ctx.response.get('X-Delay-Ms'); | |
if (delay) { | |
setTimeout(() => { | |
console.debug('done...'); |
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> | |
/// Creates a <see cref="T:System.Collections.Generic.Dictionary`2" /> from an <see cref="T:System.Collections.Generic.IEnumerable`1" /> according to specified key selector and element selector functions. | |
/// If duplicates keys are present, only the first will be used. Values with duplicate keys will be ignored. | |
/// </summary> | |
/// <typeparam name="TSource">The type of the elements of <paramref name="source" />.</typeparam> | |
/// <typeparam name="TKey">The type of the key returned by <paramref name="keySelector" />.</typeparam> | |
/// <typeparam name="TValue">The type of the value returned by <paramref name="elementSelector" />.</typeparam> | |
/// <param name="source">An <see cref="T:System.Collections.Generic.IEnumerable`1" /> to create a <see cref="T:System.Collections.Generic.Dictionary`2" /> from.</param> | |
/// <param name="keySelector">A function to extract a key from each element.</param> | |
/// <param name="elementSelector">A transform function to produce a result element value from each element.</para |
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
public abstract class DevelopmentNonRunningSchedule : DailySchedule | |
{ | |
protected DevelopmentNonRunningSchedule(params string[] times) : base(times) | |
{ | |
} | |
protected DevelopmentNonRunningSchedule() : base() | |
{ | |
} |
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 varsFile = Octopus.Parameters["tfvarsfile"]; | |
Console.WriteLine("Parsing tfVarsFile: " + varsFile); | |
if (string.IsNullOrEmpty(varsFile)) | |
throw new ApplicationException("You must provide a tf vars file location"); | |
if (!File.Exists(varsFile)) | |
throw new ApplicationException(string.Format("Specified tf vars file, {0}, not found", varsFile)); | |
string tempFile = string.Concat(varsFile, "-temp"); |
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
-- Check user with access | |
SELECT | |
p.loginame | |
FROM | |
sys.databases d | |
inner join sys.sysprocesses p ON (d.database_id = p.[dbid]) | |
WHERE | |
d.name = 'database_name' | |
-- Try to grab database 1000 times |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<meta-runner name="Cake"> | |
<description>Execute a cake script</description> | |
<settings> | |
<parameters> | |
<param name="mr.Cake.script" value="" spec="text description='The location of the Cake Script, relative to the root folder' display='normal' label='Cake Script:'" /> | |
<param name="mr.Cake.target" value="" spec="text description='The name of the Target within the Cake Script to execute' display='normal' label='Target:'" /> | |
<param name="mr.Cake.verbosity" value="" spec="select data_1='Quiet' data_3='Minimal' data_5='Normal' data_7='Verbose' data_9='Diagnostic' description='The logging level for the Cake Script' display='normal' label='Verbosity:'" /> | |
<param name="mr.Cake.arguments" value="" spec="text description='Additional arguments to pass to Cake Script' display='normal' label='Cake Arguments:'" /> | |
</parameters> |
NewerOlder