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.Diagnostics; | |
using PostSharp.Aspects; | |
using PostSharp.Extensibility; | |
namespace PostSharpAspectExample | |
{ | |
[Serializable] | |
[MulticastAttributeUsage(MulticastTargets.Method)] | |
public class TimingAspect : OnMethodBoundaryAspect |
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
// Nancy Input Extensions | |
//Stolen from https://github.com/JabbR/JabbR/blob/dev/JabbR/Nancy/InputExtensions.cs | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Text; | |
using JabbR.Infrastructure; | |
using Nancy.Validation; |
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 class ValidationRegistry : Registry | |
{ | |
public ValidationRegistry() | |
{ | |
Scan(x => | |
{ | |
x.TheCallingAssembly(); | |
x.With(new ValidatorRegistrationConvention()); | |
}); |
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.Configuration; | |
using System.Data; | |
using System.Data.SqlClient; | |
using System.Linq; | |
namespace DataAccess.Helpers | |
{ | |
public class BasicDataAccessGateway : IBasicDataAccessGateway, IOverrideableBasicGateway |
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
//http://adventofcode.com/day/14 | |
open System | |
let puzzleInput = "Vixen can fly 19 km/s for 7 seconds, but then must rest for 124 seconds. | |
Rudolph can fly 3 km/s for 15 seconds, but then must rest for 28 seconds. | |
Donner can fly 19 km/s for 9 seconds, but then must rest for 164 seconds. | |
Blitzen can fly 19 km/s for 9 seconds, but then must rest for 158 seconds. | |
Comet can fly 13 km/s for 7 seconds, but then must rest for 82 seconds. | |
Cupid can fly 25 km/s for 6 seconds, but then must rest for 145 seconds. | |
Dasher can fly 14 km/s for 3 seconds, but then must rest for 38 seconds. |
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
instructions for adding a terminal script for jetbrains rider on osx. | |
The official intructions at https://www.jetbrains.com/help/rider/Working_with_the_IDE_Features_from_Command_Line.html#toolbox offers little hope for lost souls | |
1. sudo nano /usr/local/bin/rider | |
2. put this in it | |
#!/bin/sh | |
open -na "Rider.app" --args "$@" |
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 { ListingCard } from "../components/ListingCard.tsx"; | |
import { useEffect, useState } from "react"; | |
import axios from "axios"; | |
import InfiniteScroll from "react-infinite-scroll-component"; | |
import { Listing } from "../types/Listing.tsx"; | |
import { JsonHeaders } from "../constants/Headers.ts"; | |
import { Loading } from "../components/core/Loading.tsx"; | |
export const Listings = () => { | |
const [currPage, setCurrPage] = useState(1); |