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
# Azure | |
Definitions: | |
- IaaS: A provider lets you host virtual machines, Docker instances or Kubernetes clusters and manages the that for you | |
- PaaS: A provider hosts a specific server technology for you and also manages the updates for that techology (eg. Amazon S3) | |
- SaaS: A provider hosts an application for you and also manages application updates | |
I prefer PaaS whenever possible because it reduces the complexity on my side and when the service doesn't work, their support | |
will know about the technology in question rather than just about the underlying infrastructure. |
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
create database [name] collate Latin1_General_100_CI_AS_SC_UTF8 | |
create database [name] collate Latin1_General_100_BIN2_UTF8 |
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
<!-- ngen --> | |
<Copy SourceFiles="$(MSBuildProjectDirectory)\Web.config" DestinationFiles="$(OutDir)$(AssemblyName).dummy.exe.config" /> | |
<Copy SourceFiles="$(OutDir)$(AssemblyName).dll" DestinationFiles="$(OutDir)$(AssemblyName).dummy.exe" /> | |
<GetFrameworkPath> | |
<Output | |
TaskParameter="Path" | |
PropertyName="FrameworkPath" /> | |
</GetFrameworkPath> | |
<PropertyGroup> | |
<NgenUpdateCommand>"$(FrameworkPath)\ngen.exe" update</NgenUpdateCommand> |
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
# Install with this from IE: | |
# http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/jtheisen/59fef5b48bcb415c5d77a3b86363e240/raw/294d8808123f3f1281bd814a4628caf1f16e1ff1/boxstarter.ps1 | |
# choco feature enable -n=allowGlobalConfirmation | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
Disable-BingSearch | |
# Remove Skydrive from the explorer root | |
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT |
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
license: mit | |
height: 720 | |
border: no |
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 rows = String.Join("", Enumerable.Range(1, 100).Select(i => $"<tr><td>row #{i}</td></tr>").ToArray()); | |
var html = $@" | |
<div> | |
<table> | |
<thead> | |
<tr> | |
<td>header</td> | |
</tr> | |
</thead> |
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.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace Properties.Internals | |
{ | |
public class PropertyPairHelper<T, S> | |
{ |
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
Get-ChildItem -Recurse -Include bin,obj |? { $_.FullName -inotmatch 'node_modules' } | foreach { Remove-Item -Recurse $_ } |
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
create table #space ([table] nvarchar(255), [column] nvarchar(255) not null, [bytes] bigint null); | |
declare @sql varchar(max) = '' | |
declare @tablepattern as varchar(255) = '%' | |
declare @exclusionpattern as varchar(255) = '' | |
select @sql = @sql + 'insert into #space select ''' + t.name + ''', ''' + c.name + ''', sum(datalength([' + c.name + '])) as bytes from [' + t.name + '];' | |
from sys.columns c | |
inner join sys.tables t on c.object_id = t.object_id | |
inner join sys.schemas s on t.schema_id = s.schema_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
// TwitPic/OAuth.cs | |
// | |
// Code to do OAuth stuff, in support of a cropper plugin that sends | |
// a screen snap to TwitPic.com. | |
// | |
// There's one main class: OAuth.Manager. It handles interaction with the OAuth- | |
// enabled service, for requesting temporary tokens (aka request tokens), as well | |
// as access tokens. It also provides a convenient way to construct an oauth | |
// Authorization header for use in any Http transaction. | |
// |
NewerOlder