Skip to content

Instantly share code, notes, and snippets.

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.file
Last active August 29, 2015 14:13
Contents of my .gitignore file
#-- Files
*.bak.*
*.bak
*.dll
*.exe
*.ldf
*.log
*.mdf
*.msi
*.sqlite
@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 / 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 / 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 / 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