Skip to content

Instantly share code, notes, and snippets.

View nielsbosma's full-sized avatar

Niels Bosma nielsbosma

View GitHub Profile
@carlhannes
carlhannes / sj-booking-fix.js
Last active July 11, 2023 10:02
sj-booking-fix.js
// Paste the code below into your webbrowser console and press "enter"
// To open the console you can press "F12" or "Ctrl + Shift + J" for most browsers.
// Read more here: https://appuals.com/open-browser-console/
// Instructions video on my twitter: https://twitter.com/_carlhannes/status/1590441813445599232
// The code re-tries fetching data if it gets status 429, which is the error that the SJ page has
// It does this together with an exponential back-off delay which is common to use with microservices of this type
// Because of these re-tries and the delay, the overall load of the website and the servers will be lower,
// since it does not need to re-fetch requests that actually succeed. Read more on my twitter if you're interested:
// https://twitter.com/_carlhannes/status/1590605735314206721
@markryd
markryd / nancy-linqpad.cs
Created March 7, 2016 00:39
Run Nancy in Linqpad
// nuget in Nancy and Nancy.Hosting.Self
void Main()
{
using (var host = new Nancy.Hosting.Self.NancyHost(new Uri("http://localhost:8080"), new LinqpadNancyBootstrapper()))
{
host.Start();
Console.ReadLine();
}
}