Skip to content

Instantly share code, notes, and snippets.

View SimonCropp's full-sized avatar

Simon Cropp SimonCropp

View GitHub Profile
using System;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
public static class MissingTaskUsage
{
public static void CheckForMissingTaskUsage(string assemblyPath)
{
@SimonCropp
SimonCropp / gist:845dd9e633651f3389dc950856a9eb61
Created February 14, 2017 22:36
please change json.net version
Attempting to gather dependency information for package 'Newtonsoft.Json.9.0.1' with respect to project 'Server.New', targeting '.NETFramework,Version=v4.6.1'
GET https://api.nuget.org/v3/registration1-gz/newtonsoft.json/index.json
OK https://api.nuget.org/v3/registration1-gz/newtonsoft.json/index.json 29317ms
GET https://api.nuget.org/v3/registration1-gz/nservicebus.persistence.sql/index.json
GET https://api.nuget.org/v3/registration1-gz/nservicebus/index.json
GET https://api.nuget.org/v3/registration1-gz/nservicebus.persistence.sql.msbuild/index.json
GET https://www.myget.org/F/particular/FindPackagesById()?id='NServiceBus'
GET https://www.myget.org/F/particular/FindPackagesById()?id='NServiceBus.Persistence.Sql.MsBuild'
http://www.catalog.update.microsoft.com/Search.aspx?q=KB4054517
expand -F:* windows10.0-kb4054517-x64_f1c0e8eae96b357bc13e5668c5874904502106df.msu C:\Temp\kb4054517\
start /w %SystemRoot%\system32\pkgmgr.exe /ip /m:C:\temp\kb4054517\Windows10.0-KB4054517-x64.cab
exec sp_msforeachtable 'alter table ? nocheck constraint all'
declare @tbl nvarchar(250);
declare i cursor local fast_forward for
select '[' + table_schema + '].[' + table_name + ']'
from information_schema.tables
where table_type = 'base table' and table_name != 'sysdiagrams'
open i;
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>2.0</Version>
<Version Condition="'$(BUILD_BUILDID)' != ''">$(Version).$(BUILD_BUILDID)</Version>
</PropertyGroup>
<Target Name="UpdateTFSBuildNumber" BeforeTargets="Build">
<Message Text="##vso[build.updatebuildnumber]$(Version)" Importance="high" />
</Target>
</Project>
@SimonCropp
SimonCropp / foo.cs
Created April 5, 2018 06:04
generate script for sql server db
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
//using Microsoft.SqlServer.SqlManagementObjects package
public static class SqlScriptBuiler
{
public static string BuildScript(SqlConnection sqlConnection)
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
1 200 HTTP Tunnel to api.nuget.org:443 0 devenv:18084
2 200 HTTP Tunnel to api.nuget.org:443 0 devenv:18084
3 200 HTTP Tunnel to api.nuget.org:443 0 devenv:18084
4 200 HTTP Tunnel to api.nuget.org:443 0 devenv:18084
5 200 HTTP Tunnel to api.nuget.org:443 0 devenv:18084
6 200 HTTP Tunnel to api.nuget.org:443 0 devenv:18084
7 200 HTTP Tunnel to api.nuget.org:443 0 devenv:18084
8 200 HTTP Tunnel to api.nuget.org:443 0 devenv:18084
9 200 HTTP Tunnel to api.nuget.org:443 0 devenv:18084
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
59 200 HTTP Tunnel to api.nuget.org:443 0 devenv:7312
60 200 HTTP Tunnel to api.nuget.org:443 0 devenv:7312
61 200 HTTP Tunnel to api.nuget.org:443 0 devenv:7312
62 200 HTTP Tunnel to api.nuget.org:443 0 devenv:7312
63 200 HTTP Tunnel to api.nuget.org:443 0 devenv:7312
64 200 HTTP Tunnel to api.nuget.org:443 0 devenv:7312
65 200 HTTP Tunnel to api.nuget.org:443 0 devenv:7312
66 200 HTTP Tunnel to api.nuget.org:443 0 devenv:7312
67 200 HTTP Tunnel to api.nuget.org:443 0 devenv:7312
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
1 200 HTTPS api-v2v3search-0.nuget.org /query?q=&skip=0&take=26&prerelease=false&supportedFramework=.NETFramework,Version=v4.7.2&semVerLevel=2.0.0 20,887 no-cache; Expires: 0 application/json devenv:7312
2 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.nlog.fody/index.json 7,002 no-store application/json devenv:7312
3 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.log4net.fody/index.json 6,884 no-store application/json devenv:7312
4 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.catel.fody/index.json 5,825 no-store application/json devenv:7312
5 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/xunit.runner.visualstudio/index.json 5,009 no-store application/json devenv:7312
6 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.custom.fody/index.json 5,626 no-store application/json devenv:7312
7 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.commonloggin
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
1 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.nlog.fody/index.json 7,002 no-store application/json devenv:7312
2 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.log4net.fody/index.json 6,884 no-store application/json devenv:7312
3 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.commonlogging.fody/index.json 5,619 no-store application/json devenv:7312
4 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/xunit.runner.visualstudio/index.json 5,009 no-store application/json devenv:7312
5 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.catel.fody/index.json 5,825 no-store application/json devenv:7312
6 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.nservicebus.fody/index.json 3,839 no-store application/json devenv:7312
7 200 HTTPS api.nuget.org /v3/registration3-gz-semver2/anotar.serilog.fody/index.json 7,368 no-store application/json devenv:7312
8 20