Skip to content

Instantly share code, notes, and snippets.

View nickfloyd's full-sized avatar
🎯
Taking on problems one byte at a time

Nick Floyd nickfloyd

🎯
Taking on problems one byte at a time
View GitHub Profile
@nickfloyd
nickfloyd / gist:1229517
Created September 20, 2011 16:05
Setting up a local repo and pushing to github
Global setup:
Set up git
git config --global user.name "FirstName LastName"
git config --global user.email [email protected]
Next steps:
mkdir test
cd test
git init
touch README
@nickfloyd
nickfloyd / open sln via bash
Created November 22, 2011 05:02
The following gist will allow you to alias open paths to your local solution files. It: 1. Changes the directory in to the solution directory 2. Opens up the given solution Really just a convenance, if you do not want to leave your keyboard and open co
#Create .bashrc in $HOME if one does not exist
touch ~/.bashrc
#add aliases for each commonly used solution - replacing PROJECTNAME and PROJECT with their actual names
alias psln='cd /c/dev/PROJECT && start /c/dev/PROJECT/PROJECTNAME.sln /D /c/dev/PROJECT/'
alias ifsln='cd /c/dev/PROJECT && start /c/dev/PROJECT/PROJECTNAME.sln /D /c/dev/PROJECT/'
@nickfloyd
nickfloyd / verizon fios support chat
Created January 23, 2012 17:53
How many support fails can you find with my brief chat with support?
Chat Subject:FiOS Internet (Slow Speed)
Your Question:This is the 3rd time I have contacted support in the past month and have had a service tech out - I can only sporadically connect and now when I do I get terrible speed. http://www.speedtest.net/result/1725566801.png
A Verizon Service Representative will be with you shortly. Thank you.
Agent Nehru has joined. (11:06:26)
Nehru : Chat ID for this session is 01231210435. (11:06:26)
Nehru(11:06:31): Thank you for contacting Verizon FIOS technical chat support. My name is Nehru; we appreciate your patience in reaching us.
Nehru(11:06:51): May I have your FIOS home phone number?
@nickfloyd
nickfloyd / sync fork
Created February 9, 2012 14:36
used to sync a forked git repo with a master repo
git remote add upstream [git repo endpoint]
git fetch upstream
git merge upstream/master
@nickfloyd
nickfloyd / gist:2402596
Created April 17, 2012 00:42
gitignore
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
@nickfloyd
nickfloyd / HttpModule
Created April 17, 2012 19:26
HttpModule for grabbing status code at the end of the request
Code that goes in the Web.Config inside the configuration node:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="_9569.StatusCodeModule" />
<add name="StatusCodeModule" type="_9569.StatusCodeModule" />
</modules>
</system.webServer>
@nickfloyd
nickfloyd / gist:4444709
Created January 3, 2013 16:27
Windows 8 execute all things as admin
#To disable the UAC prompt and run everything by default as admin
#Is set to 1 by default
Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Value "0"
shutdown -r -t 0 #reboot
#--------------------------------------------------
#If the above breaks your ability as an Admin to install apps from the Microsoft store
#run the following in an elevated Powershell console
@nickfloyd
nickfloyd / active_connections.sql
Created October 31, 2013 16:32
SQL that returns number of connections per database grouped by login
SELECT
DB_NAME(dbid) as DBName,
COUNT(dbid) as NumberOfConnections,
loginame as LoginName
FROM
sys.sysprocesses
WHERE
dbid > 0
GROUP BY
dbid, loginame
@nickfloyd
nickfloyd / newrelic_mongoDB.xml
Last active August 29, 2015 13:56
New Relic Extension xml MongoDB for the 10gen driver
<?xml version="1.0" encoding="utf-8"?>
<extension xmlns="urn:newrelic-extension">
<instrumentation>
<!-- instrument MongoDB.Driver.Collection -->
<tracerFactory metricName="Mongo">
<match assemblyName="MongoDB.Driver" className="MongoDB.Driver.Collection">
<exactMethodMatcher methodName="Count" />
<exactMethodMatcher methodName="Count" parameters="MongoDB.Driver.Document" />
<exactMethodMatcher methodName="FindAll" />
<exactMethodMatcher methodName="FindOne" parameters="MongoDB.Driver.Document" />
@nickfloyd
nickfloyd / windbg_memory.txt
Last active January 20, 2025 09:57
windbg commands for finding memory leaks
From:
http://blogs.msdn.com/b/paullou/archive/2011/06/28/debugging-managed-code-memory-leak-with-memory-dump-using-windbg.aspx
#Set symbols File >> Symbol File path
SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
.reload
.loadby sos clr or .loadby sos mscorwks!