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 GetColorsQuery : IRequest<Either<IEnumerable<ColorPayloadDto>, ValidationResult>> | |
{ | |
// no properties necessary, as the query will return all Colors. | |
} |
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
/* | |
* This class was taken from this GitHub repo https://github.com/mikhailshilkov/mikhailio-samples | |
* under an MIT licence. | |
*/ | |
/// <summary> | |
/// Functional data data to represent a discriminated | |
/// union of two possible types. | |
/// </summary> | |
/// <typeparam name="TL">Type of "Left" item.</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
public class GetColorsQueryHandler : IRequestHandler<GetColorsQuery, Either<IEnumerable<ColorPayloadDto>, ValidationResult>> | |
{ | |
private readonly IColorsService _colorsService; | |
public GetColorsQueryHandler(IColorsService colorsService) | |
{ | |
_colorsService = colorsService; | |
} | |
public async Task<Either<IEnumerable<ColorPayloadDto>, ValidationResult>> Handle(GetColorsQuery request, CancellationToken cancellationToken) |
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 ColorsController : KesselRunApiController | |
{ | |
public ColorsController( | |
ICurrentUser currentUser, | |
ILogger logger, | |
IMediator mediator) | |
: base(currentUser, logger, mediator){} | |
public async Task<IActionResult> GetColors() | |
{ |
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
// ==UserScript== | |
// @name news.com.au - Video Be Gone | |
// @description removes video and top ad from news.com.au stories | |
// @version 1 | |
// @grant none | |
// @match https://www.news.com.au/ | |
// @match https://www.news.com.au/* | |
// @noframes | |
// ==/UserScript== |
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
// function from the old days before Modules. Was very handy if you wanted to namespace your code. | |
if (!window.createNamespace) { | |
window.createNamespace = function (name, separator, container) { | |
var o = container || window; | |
name.split(separator || '.').forEach(function (x) { | |
o = o[x] = o[x] || {}; | |
}); | |
return o; | |
}; | |
} |
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
#!/bin/bash | |
compressAll() { | |
declare -a repos | |
repos=() | |
for i in "$1"/*;do # for all in the root | |
if [ -f "$i" ]; then # if a file exists | |
echo "$i" > /dev/null # send it to null |
OlderNewer