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 Chocolatey and applications | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
# Disable confirmations | |
choco feature enable -n allowGlobalConfirmation | |
# Running this runs the above | |
iex ((new-object net.webClient).DownloadString('https://gist.githubusercontent.com/karol1990/4f5455e9fbfb3c8af145b60c084c8ebe/raw/62dfd04b592177a7bfdfee9d787a0ef41882266d/chocolatey-env-setup.ps1')) |
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"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2019-01-10 10:58:30" build="190108"> | |
<value name="Language" type="string" data="en"/> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{Shells::PowerShell (Admin)}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> |
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
.load sos / .loadby sos clr | |
!help | |
.time | |
!threadpool | |
!runaway - all threads + cpu usage | |
!threads | |
~[threadId]s | |
!clrstack (-p) | |
!dumpobj 0x3333(address) |
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
rm alias:curl | |
New-ALias find Get-ChildItem | |
function touch ([string]$name) { | |
if($name -match '[^\.]+\.[^$]+') { | |
New-Item -ItemType File -Name $name | |
} else { | |
New-Item -ItemType Directory -Name $name | |
} |
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
SELECT cp.objtype AS ObjectType, | |
OBJECT_NAME(st.objectid,st.dbid) AS ObjectName, | |
cp.usecounts AS ExecutionCount, | |
st.TEXT AS QueryText, | |
qp.query_plan AS QueryPlan | |
FROM sys.dm_exec_cached_plans AS cp | |
CROSS APPLY sys.dm_exec_query_plan(cp.plan_handle) AS qp | |
CROSS APPLY sys.dm_exec_sql_text(cp.plan_handle) AS st | |
WHERE OBJECT_NAME(st.objectid,st.dbid) = 'stored_proc_name' |
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.Diagnostics; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Web; | |
using System.Web.Configuration; | |
using System.Web.Mvc; |
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.Runtime.InteropServices; | |
namespace ItWorks.Api.Infrastructure | |
{ | |
public static class UUId | |
{ | |
/// <summary> | |
/// This method can be used to retrieve well formed universally unique id. The advantage is, it has no vulnerability what GUID v1 and has good distribution so won't overload SQL Server | |
/// </summary> |
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
FROM node:10.6.0-alpine AS build | |
WORKDIR /src | |
COPY ${PROJECT_NAME}/package*.json ./ | |
RUN npm install | |
COPY ${PROJECT_NAME}/ . | |
RUN npm run build | |
FROM nginx:alpine | |
EXPOSE 80 | |
COPY ${PROJECT_NAME}/nginx.conf /etc/nginx/nginx.conf |
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
# Switch HyperV off | |
bcdedit /set hypervisorlaunchtype off | |
#Switch HyperV on | |
bcdedit /set hypervisorlaunchtype auto | |
#Above require system reboot but allow quick toggle so switch from HyperV to VirtualBox can be done painless |
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
Write-Host "Removing local branches that were merged to develop" | |
git branch --merged | Where { $_ -NotMatch "(^\*|master|develop|help|remote)" } | %{git branch -d $_.Trim()} |
OlderNewer