Skip to content

Instantly share code, notes, and snippets.

@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active June 29, 2024 01:12
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
// Pages constants class
public class AdministratorPages
{
public const string Base = "/Administrator";
public static string Index = $"{Base}/Index";
public static string EmployeesIndex = $"{Base}/Employees/Index";
}
// Usage in a View
<a asp-page="@AdministratorPages.Index">Administrator Home Page</a>
@font-face {
font-family: SegoeUI;
src:
local("Segoe UI Light"),
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff2) format("woff2"),
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff) format("woff"),
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf) format("truetype");
font-weight: 100;
}
@JustCallMeAD
JustCallMeAD / Bootstrap 4 (show debug info).html
Last active June 16, 2018 05:47
BOOTSTRAP 4 - SHOW DEBUG INFO
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
@Omranic
Omranic / pwa-fast-load.md
Last active May 22, 2020 14:06
1. Fast first load - Your First Progressive Web App
@sthewissen
sthewissen / RouteDataExtensions.cs
Last active July 23, 2018 05:02
Extension method for getting Route data in ASP.NET MVC Razor pages
public static class RouteDataExtensions
{
// Usage can be seen here: http://www.dvolve.org/2016/01/getting-route-data-in-asp-net-razor/
public static bool Contains(this RouteData route, string action = null, string controller = null, string area = null, StringComparison comparison = StringComparison.CurrentCultureIgnoreCase)
{
// Get the parts that we'll check.
var areaToCheck = route.DataTokens["Area"];
var actionToCheck = route.Values.ContainsKey("Action") ? route.Values["Action"] : null;
var controllerToCheck = route.Values.ContainsKey("Controller") ? route.Values["Controller"] : null;
@mcnkbr
mcnkbr / GenericRepository.cs
Last active February 29, 2024 05:35
Generic Repository and AutoMapper for .NET Entity Framework
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using Common.Extensions;
using AutoMapper;
namespace Repository
{
@stefanfoulis
stefanfoulis / gist:5352655
Created April 10, 2013 07:51
google places autocomplete widget limited to cities
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("maps", "3.x", {callback: initialize, other_params:'sensor=false&libraries=places'});
function initialize() {
var input = document.getElementById('id_location');
var autocomplete = new google.maps.places.Autocomplete(input, { types: ['(cities)'], region:'EU' });
google.maps.event.addListener(autocomplete, 'place_changed', function() {
var place = autocomplete.getPlace();
if (!place.geometry) {