This file contains hidden or 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
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
################### | |
# compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe |
This file contains hidden or 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
/* | |
Find string if it exists in any table in a database | |
Source: http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/the-ten-most-asked-sql-server-questions--1/#2 | |
Found via: http://stackoverflow.com/a/9185923/138938 | |
*/ | |
CREATE PROCEDURE FindMyData_String | |
@DataToFind NVARCHAR(4000), | |
@ExactMatch BIT = 0 |
This file contains hidden or 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
/* | |
This is really interesting, I had no idea. | |
http://shapeshed.com/html5-speech-recognition-api/ | |
HTML5 includes built in speech recognition, which is stupid easy to use: | |
Open your console and enter: | |
*/ |
This file contains hidden or 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
# https://stackoverflow.com/questions/29873439/how-do-i-update-all-chocolatey-apps-without-confirmation/30428182#30428182 | |
# tldr: choco feature enable -n=allowGlobalConfirmation | |
cinst launchy | |
cinst ditto | |
cinst beyondcompare | |
cinst instanteyedropper | |
cinst 7zip | |
cinst linqpad | |
cinst cmder |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
// run the following from the console | |
document.getElementsByTagName('video')[0].playbackRate=2 |
This file contains hidden or 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
Sub TestCreateDirIfNeeded() | |
Dim path As String | |
path = "C:\imarealboy" | |
CreateDirIfNeeded (path) | |
End Sub | |
Sub CreateDirIfNeeded(path As String) | |
On Error Resume Next | |
MkDir path | |
On Error GoTo 0 |
This file contains hidden or 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
<!-- This script supplied by Bill Anton http://byobi.com/blog/2013/06/extended-events-for-analysis-services/ --> | |
<!-- Blog post on how to use this: http://markvsql.com/2014/02/introduction-to-analysis-services-extended-events/ --> | |
<Create | |
xmlns="http://schemas.microsoft.com/analysisservices/2003/engine" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" | |
xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" | |
xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" | |
xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" | |
xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300"> |
This file contains hidden or 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
<# | |
SOURCE: https://www.simple-talk.com/sql/database-administration/automated-script-generation-with-powershell-and-smo/ | |
See script options and defaults in comment block at end of file | |
or look here for the official list: | |
https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.scriptingoptions.aspx | |
Override any defaaults you want in the script below | |
#> | |
$Filepath='E:\MyScriptsDirectory' # local directory to save build-scripts to | |
$DataSource='MyServer' # server name and instance | |
$Database='MyDatabase'# the database to copy from |
This file contains hidden or 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
class Program | |
{ | |
public static SqlConnection GetOpenConnection() | |
{ | |
var dapperConnString = ConfigurationManager.ConnectionStrings["DapperConn"].ConnectionString; | |
var connection = new SqlConnection(dapperConnString); | |
connection.Open(); | |
return connection; | |
} |