Skip to content

Instantly share code, notes, and snippets.

View tidusjar's full-sized avatar

Jamie Rees tidusjar

View GitHub Profile
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
// ... Stuff
app.Use(async (context, next) =>
{
if (context.Request.Path.StartsWithSegments(new PathString("/api")))
{
// Let's check if this is an API Call
if (context.Request.Headers["ApiKey"].Any())
body {
background:white !important;
}
#applicationName {
color:red !important;
}
private static async Task<bool> DeferMessage(BrokeredMessage message)
{
await message.DeferAsync().ConfigureAwait(false);
var client = TopicClient.CreateFromConnectionString(ConnectionString, TopicName);
var obj = new DeferredMessageModel { SequenceNumber = message.SequenceNumber };
using (var ms = new MemoryStream())
using (var writer = new StreamWriter(ms))
using (var jsonWriter = new JsonTextWriter(writer))
@tidusjar
tidusjar / delete.js
Created August 22, 2019 08:45 — forked from ojame/delete.js
Delete all movies that have been 'downloaded' in Radarr. Mass/bulk deleting.
// Go to Radarr and click 'settings' => 'general'.
// Open the JavaScript Console in Google Chrome (View => Developer => Javascript Console)
// Past the following in. Hit enter and away you go.
const key = document.getElementsByClassName('x-api-key')[0].value;
if (!key) {
alert('Navigate to /settings/general and run again');
}