Skip to content

Instantly share code, notes, and snippets.

View mdickin's full-sized avatar

Matt Dickinson mdickin

View GitHub Profile
@mdickin
mdickin / gist:f4f6744774e650bf4c3aae2d313bd71a
Last active December 16, 2019 17:54
Finding and clearing SQL execution plans
SELECT cp.plan_handle, cp.objtype, cp.usecounts,
DB_NAME(st.dbid) AS [DatabaseName], st.text, cp.refcounts--, qp.query_plan
FROM sys.dm_exec_cached_plans AS cp
CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS st
CROSS APPLY sys.dm_exec_query_plan(plan_handle) qp
where objtype = 'Prepared' and
cp.usecounts > 4 and
st.text LIKE N'%some text in the query you want to search for%' OPTION (RECOMPILE);
-- For SQL Server
These are placed in the appropriate json file
---------------------------------------
"Vue Component": {
"prefix": "vuec",
"body": [
"import Vue from 'vue'",
"import { Component, Prop, Watch } from 'vue-property-decorator';",
"",
"@Component({",
" components: {",
@mdickin
mdickin / git aliases
Last active February 27, 2019 15:27
Helpful aliases in git
//git config --global alias.<alias> <git-command>
//C:\Users\matt.dickinson\.gitconfig
//Remove a remote branch
delr = push -d origin
//Create a new branch
newb = "!git branch $1 && git checkout $1 && git push -u origin $1 #"
//Delete local and remote branch
delb = "!git push -d origin $1 && git branch -d $1 #"
//Refresh "latest" branch from server without having to change working branches
@mdickin
mdickin / FiddlerWeb.config
Created October 27, 2016 18:22
Modify ASP.NET proxy to run through Fiddler
<configuration>
<system.net>
<defaultProxy enabled="true">
<proxy proxyaddress="http://127.0.0.1:8888" bypassonlocal="False"/>
</defaultProxy>
</system.net>
</configuration>