Skip to content

Instantly share code, notes, and snippets.

@algonzalez
algonzalez / README.md-template
Last active August 29, 2015 14:01
README.md template
# {project name} - README
{project name} is a console application containing tests for {description}.
The tests are written using the [PetaTest][] unit testing framework.
Simply compile and start the resulting executable to run the tests.
See the *"Selecting tests to run"* section, for details on how to specify which tests will run.
## Configuration
@algonzalez
algonzalez / NLog.config
Last active August 29, 2015 14:03
NLog.config for ASP.NET MVC app
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<targets>
<!-- add your targets here -->
@algonzalez
algonzalez / NLog.config
Last active August 29, 2015 14:03
NLog.config for basic file logging
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<targets>
<!-- add your targets here -->
<target name="logfile" xsi:type="File"
@algonzalez
algonzalez / git.config.settings
Last active August 29, 2015 14:13
git config settings
git config --global user.name "{your name}"
git config --global user.email "{yout email address}"
REM set up Notepad++ as the editor of choice
git config --global core.editor "'{path to notepad++}\notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
REM set up WinMerge as the tool to use when calling "git difftool"
git config --global diff.tool winmerge
git config --global difftool.winmerge.cmd "'{path to winmergeU.exe}\winmergeU.exe' -e -u -wl -maximize \"$LOCAL\" \"$REMOTE\""
git config --global difftool.prompt false
@algonzalez
algonzalez / git.gitignore.file
Last active August 29, 2015 14:13
Contents of my .gitignore file
#-- Files
*.bak.*
*.bak
*.dll
*.exe
*.ldf
*.log
*.mdf
*.msi
*.sqlite
select
database_id as 'Database ID', name as 'Database Name',
CASE encryption_state
WHEN 0 THEN 'No database encryption key present, no encryption'
WHEN 1 THEN 'Unencrypted'
WHEN 2 THEN 'Encryption in progress'
WHEN 3 THEN 'Encrypted'
WHEN 4 THEN 'Key change in progress'
WHEN 5 THEN 'Decryption in progress'
WHEN 6 THEN 'Protection change in progress'
@algonzalez
algonzalez / git.gitignore.forEmptyFiles
Last active August 29, 2015 14:14
Place this ".gitignore" file in an empty directory so that it will be tracked with the project but don't want any other files in the directory to be tracked.
# ignore all files in this directory
*
# except for these files
!.gitignore
# and except nested directories (remove if no sub-dirs should be tracked)
!*/
@algonzalez
algonzalez / CloneFromTfsToGit.cmd
Created January 28, 2015 20:43
Using Git-TF to clone a project from TFS to Git
rem Git-TF can be found here https://gittf.codeplex.com/
rem call "{path to git-tf}\git-tf help clone" for available command options
{path to git-tf}\git-tf clone {project collection URL} {project path to be cloned} {target directory for clone} --deep --no-tag
rem example:
rem git-tf clone http://tfs:8080/tfs/DefaultCollection $/some_project c:\dev\some_project.git --deep --no-tag
rem -----
rem alternative: see https://github.com/git-tfs/git-tfs
@algonzalez
algonzalez / vs.config.usingWinMerge
Last active August 29, 2015 14:14
Configure Visual Studio User Tools to use WinMerge
// To Compare
Extensions: .*
Operation: Compare
Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
Arguments: /maximize /e /u /wl /dl %6 /dr %7 %1 %2
// To Merge
Extensions: .*
Operation: Merge
Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
@algonzalez
algonzalez / ShowWiFiInfo.bat
Created February 17, 2015 16:20
Current Wi-Fi connection Info
rem display current Wi-Fi connection info including SSID
netsh wlan show interface
rem display more details of current Wi-Fi connection
rem NOTE: replace {SSID} with value from found with previous command
netsh wlan show profiles name={SSID}
rem same as above, but includes the password
netsh wlan show profiles name={SSID} key=clear