Skip to content

Instantly share code, notes, and snippets.

View trailmax's full-sized avatar

Max Vasilyev trailmax

View GitHub Profile
@markekraus
markekraus / AzCmdletMapping.md
Last active August 30, 2024 04:44
Az to AzureRm Cmdlet Mappings

Az to AzureRM command Mappings

Source

Az.Aks

Az Command AzureRm Command
Get-AzAks Get-AzureRmAks
New-AzAks New-AzureRmAks
@NickCraver
NickCraver / BotLovin.cs
Last active January 5, 2023 11:36
Some bot/crawler fun on Stack Overflow. 10 hours of fun, to be precise.
private static readonly string[] tenHoursOfFun =
{
"https://www.youtube.com/watch?v=wbby9coDRCk",
"https://www.youtube.com/watch?v=nb2evY0kmpQ",
"https://www.youtube.com/watch?v=eh7lp9umG2I",
"https://www.youtube.com/watch?v=z9Uz1icjwrM",
"https://www.youtube.com/watch?v=Sagg08DrO5U",
"https://www.youtube.com/watch?v=5XmjJvJTyx0",
"https://www.youtube.com/watch?v=IkdmOVejUlI",
"https://www.youtube.com/watch?v=jScuYd3_xdQ",
@NickCraver
NickCraver / Win10NagRemover.ps1
Last active July 25, 2023 00:20
Windows 10 Upgrade Nag Remover. This script removes the Windows 7 & 8 updates that cause the Windows 10 upgrade nags to appear and hides them to prevent re-install. Must be run as administrator.
# Simple script to remove the Windows 10 "Nag" Updates and telemetry additions for Windows 7 & 8 users
# This will uninstall the updates and hide them, preventing installation in the future
# Note: MUST BE RUN AS ADMINISTRATOR, setting updates to hidden requires admin permissions
# Updates removed:
# KB3035583 - Update installs Get Windows 10 app in Windows 8.1 and Windows 7 SP1
# https://support.microsoft.com/en-us/kb/3035583
# KB2952664 - Compatibility update for upgrading Windows 7
# https://support.microsoft.com/en-us/kb/2952664
# KB2976978 - Compatibility update for Windows 8.1 and Windows 8
# https://support.microsoft.com/en-us/kb/2976978
@trailmax
trailmax / EnvironmentCreation.ps1
Last active January 24, 2019 11:59
Environment Creation
choco install 7zip
choco install chocolateygui
choco install ConEmu
choco install DotNet4.5.2
choco install DotNet4.6.1
choco install dotnet4.7.1
choco install dotnet4.7.2
choco install dotnetcore-sdk
choco install dotnetfx
choco install dotPeek
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection;
namespace Bleroy.Helpers {
public static class NotNull {
public static TProp Get<TSource, TProp>(this TSource source, Expression<Func<TSource, TProp>> property) where TSource : class {
if (source == null) return default(TProp);
var current = property.Body;
@clupasq
clupasq / RunnableInDebugOnlyAttribute.cs
Created August 8, 2013 05:45
xUnit.net RunnableInDebugOnlyAttribute
public class RunnableInDebugOnlyAttribute : FactAttribute
{
private string _skip;
public override string Skip
{
get
{
return Debugger.IsAttached
? _skip
@AlexZeitler
AlexZeitler / gist:3312858
Created August 10, 2012 09:22
Renaming entities with RavenDb patching API
using System.Linq;
using System.Threading;
using Raven.Abstractions.Data;
using Raven.Abstractions.Indexing;
using Raven.Client;
using Raven.Client.Embedded;
using Raven.Json.Linq;
using Xunit;
namespace RavenDbPatching.StringIdPatching {
@i-e-b
i-e-b / SqlHelper.cs
Created June 28, 2012 12:06
A wrapper around System.Data.SqlClient to make it less weird.
using System;
namespace System.Data.SqlClient {
public class SqlHelper {
readonly string connectionString;
public SqlHelper(string connectionString) { this.connectionString = connectionString; }
public string StringCommand (string commandString, Action<SqlParameterCollection> bindingCommand) {
using (var connection = new SqlConnection(connectionString)) {
anonymous
anonymous / bootstrap-notifications.js
Created January 6, 2012 09:43
Javascript for notifications (alerts) for Twitter Bootstrap
/*
I created the following javascript to use bootstrapt's notifications through Javascript.
If you like it you may consider adding it to bootstrapt. Feel free to modify if necessary.
Be sure you define a div #notification-area, where the notifications are going to be displayed by default.
I use it with jQuery 1.7.1 but it should work with older versions. Is also use jquery.hotkeys.js ( https://github.com/jeresig/jquery.hotkeys ) for block messages hotkeys
*/
(function( $ ){
var pub = {
@brianlow
brianlow / FindConflictingReferences.cs
Created January 3, 2012 03:04
Find conflicting assembly references
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
namespace MyProject
{
[TestFixture]