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
{ | |
// Place your snippets for sql here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", |
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 void ConfigureServices(IServiceCollection services) | |
{ | |
services | |
.AddFluentEmail("[email protected]") | |
.AddRazorRenderer() | |
.AddSmtpSender("localhost", 25); | |
} |
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 HomePageService | |
{ | |
public static string HomeModelCacheKey = "HomeModel"; | |
private static TimeSpan cacheExpiry = new TimeSpan(12, 0, 0); //12 hours | |
private readonly PositionsGroupedByTagQuery positionsGroupedByTagQuery; | |
private readonly IAppCache cache; | |
public HomePageService(PositionsGroupedByTagQuery positionsGroupedByTagQuery, IAppCache cache) | |
{ |
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 path = require('path') | |
const webpack = require('webpack') | |
const ExtractTextPlugin = require('extract-text-webpack-plugin') | |
const outputDir = './wwwroot/dist' | |
const entry = './wwwroot/js/app.js' | |
const cssOutput = 'site.css' | |
module.exports = (env) => { | |
return [{ |
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
{ | |
"name": "austechjobs", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"dev": "cross-env ASPNETCORE_ENVIRONMENT=Development NODE_ENV=development dotnet run", | |
"watch": "webpack --watch --mode=development", | |
"build": "webpack --mode=production --optimize-minimize", |
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 static class CacheExtensions | |
{ | |
static object sync = new object(); | |
/// <summary> | |
/// Executes a method and stores the result in cache using the given cache key. If the data already exists in cache, it returns the data | |
/// and doesn't execute the method. Thread safe, although the method parameter isn't guaranteed to be thread safe. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="cache"></param> |
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 CONFIGURATION | |
##################### | |
# Boxstarter options | |
$Boxstarter.RebootOk=$true # Allow reboots? | |
$Boxstarter.NoPassword=$false # Is this a machine with no login password? | |
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot | |
#region Initial Windows Config |
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 DataMockHelpers | |
{ | |
public Mock<IQeraUnit> GetMockUnit() | |
{ | |
var unit = new Mock<IQeraUnit>(); | |
return unit; | |
} | |
public Mock<TRepo> MockRepo<TRepo, TEntity>(List<TEntity> seedData = null, bool callBase = false, MockBehavior behavior = MockBehavior.Default) | |
where TRepo : class, IRepo<TEntity> |
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> | |
/// Adds template to email from embedded resource | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="path">Path the the embedded resource eg [YourAssembly].[YourResourceFolder].[YourFilename.txt]</param> | |
/// <param name="model">Model for the template</param> | |
/// <param name="isHtml">True if Body is HTML, false for plain text (Optional)</param> | |
/// <param name="assembly">The assembly your resource is in. Defaults to calling assembly.</param> | |
/// <returns></returns> |
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 Program | |
{ | |
/// <summary> | |
/// Entry point. | |
/// </summary> | |
/// <param name="args">The args.</param> | |
/// <returns></returns> | |
static int Main(string[] args) | |
{ | |
var rawConnectionString = ConfigurationManager.ConnectionStrings["db"].ConnectionString; |
NewerOlder