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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<button>sort</button> | |
<ul> |
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
function getWidth(width, spacing, amountOfColumns){ | |
return (width - (spacing * (amountOfColumns - 1))) / amountOfColumns; | |
} | |
console.log(getWidth(921, 10, 3)); | |
console.log(getWidth(921, 10, 2)); | |
console.log(getWidth(921, 10, 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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin margin-class($side, $number) { | |
$firstLetter: str-slice($side, 0, 1); | |
.m-#{$firstLetter}-#{$number}{ | |
margin-#{$side}: #{$number}px; | |
} |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<startup> | |
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> | |
</startup> | |
<connectionStrings> | |
<add name="core" connectionString="yourconnectionstring" providerName="System.Data.SqlClient"/> | |
</connectionStrings> | |
<system.web> | |
<membership defaultProvider="sql" hashAlgorithmType="SHA512"> |
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
var path1 = "/slfkj/sadfkl#cat=5,id=dfsklsdkajf"; | |
var path2 = "/slfkj/sadfkl#cat=a,id=dAS"; | |
var path3 = "/slfkj/sadfkl#cat=asf,id=BL"; | |
function getHashValues(path){ | |
var result = {}; | |
var hash = path.slice(path.indexOf('#') + 1); | |
var keyValues = hash.split(','); | |
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 BlogPostUrlProvider : IUrlProvider | |
{ | |
public IEnumerable<string> GetOtherUrls(UmbracoContext umbracoContext, int id, Uri current) | |
{ | |
return Enumerable.Empty<string>(); | |
} | |
public string GetUrl(UmbracoContext umbracoContext, int id, Uri current, UrlProviderMode mode) | |
{ | |
var content = umbracoContext.ContentCache.GetById(id); |
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
param([string] $csvPath, [string] $configOutputPath, [string] $rewriteMapName) | |
$csv = Import-Csv -Delimiter ";" -Path $csvPath | |
$xml = New-Object -TypeName XML | |
$xml.Load($configOutputPath) | |
$rewriteMap = Select-XML -Xml $xml -XPath "//rewriteMap[@name='$rewriteMapName']" | |
$rewriteMap.Node.SelectNodes('//add') | ForEach { $_.ParentNode.RemoveChild($_) } | Out-Null |
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
#Based on https://www.lieben.nu/liebensraum/2017/07/transferring-a-domain-to-azure-dns-and-billing/ | |
Connect-AzureRmAccount | |
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.DomainRegistration | |
$rgName = "MY_RESOURCE_GROUP_NAME" #Azure Resource Group to put DNS in | |
$ResourceName = "MY_DOMAINNAME.COM" #Your domain name | |
$AuthCode = "YOUR AUTH CODE" #transfer authentication code form Domain Registrar (GoDaddy) | |
$ResourceLocation = "Global" |
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 partial class TriggerError500 : PortalModuleBase | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
if(UserId == -1) | |
{ | |
throw new NotImplementedException(); | |
} | |
} | |
} |
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 Microsoft.ApplicationInsights.Channel; | |
using Microsoft.ApplicationInsights.DataContracts; | |
using Microsoft.ApplicationInsights.Extensibility; | |
using System; | |
namespace YourApp.ApplicationInsights | |
{ | |
public class PingFilter : ITelemetryProcessor | |
{ | |
//next processor in the pipeline |