This file contains 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
/*------------------------------------------------------------------------------------ | |
Server login | |
-----------------------------------------------------------------------------------*/ | |
if not exists (select 1 from sys.server_principals where name = N'MyDatabaseUser') | |
create login [MyDatabaseUser] | |
with password = 'password', | |
default_database = [MyDatabase], | |
check_policy = off, | |
check_expiration = off | |
go |
This file contains 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
DECLARE @tableName varchar(100) | |
DECLARE @whereClause varchar(100) | |
SET @tableName = 'Customers' | |
SET @whereClause = 'WHERE id = 999' | |
DECLARE @table TABLE(id int identity(1, 1), name varchar(100)) | |
INSERT INTO @table (name) | |
SELECT name FROM sys.columns WHERE object_id = OBJECT_ID(@tableName) |
This file contains 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
function Invoke-Using { | |
param ( | |
[Parameter(Mandatory=$true)] | |
[System.IDisposable]$Disposable, | |
[Parameter(Mandatory=$true)] | |
[ScriptBlock] $Script | |
) | |
Try { |
This file contains 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
function Read-Query | |
{ | |
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$ConnectionString, | |
[Parameter(Mandatory=$true)] | |
[string]$Query, | |
[Parameter(Mandatory=$true)] |
This file contains 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://gist.github.com/niaher/8b7925c2584182127f53 | |
'use strict'; | |
angular.module('ui.ladda', []).directive('laddaButton', ["$q", function ($q) { | |
function run(ladda) { | |
ladda.start(); | |
var progress = 0; | |
var timeout = null; |
This file contains 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
angular.module("coderful.persona", []) | |
.constant("navigator", window.navigator) | |
.provider("persona", [ | |
"navigator", function(navigator) { | |
var loginUrl; | |
var logoutUrl; | |
var getUser = angular.noop; | |
this.init = function(options) { | |
options = options || {}; |
This file contains 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
(function(){ | |
function loadGist(element, gistId) { | |
var callbackName = "gist" + gistId; | |
var script = document.createElement("script"); | |
script.src = "https://gist.github.com/" + gistId + ".json?callback=" + callbackName; | |
window[callbackName] = function (gistData) { | |
delete window[callbackName]; | |
var html = '<link rel="stylesheet" href="' + gistData.stylesheet + '"></link>'; | |
html += gistData.div; |
This file contains 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 a simple github gist. | |
console.log("hello world!"); |
This file contains 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
<style> | |
.link {padding:2px 3px; border-radius:3px; display:inline-block; margin:0 5px; border:1px solid} | |
.link.story {background:#A7EEFF; border-color:#8EC7D8} | |
.link.issue {background:#4CFF85; border-color:#6DC295} | |
</style> | |
<script> | |
(function() { | |
$(document).ajaxComplete(initTags); |
This file contains 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
$one = Get-ChildItem "C:\x" -Recurse -Include @("*.html", "*.js") | |
$two = Get-ChildItem "C:\y" -Recurse -Include @("*.html", "*.js") | |
Compare-Object -ReferenceObject $one -DifferenceObject $two -Property Name,Length -ExcludeDifferent -IncludeEqual |
OlderNewer