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
#Note: Needs to be installed via Tools->Script Editor and works one document at a time (for now) | |
function onOpen() { | |
// Add a menu with some items, some separators, and a sub-menu. | |
DocumentApp.getUi().createMenu('Fresh Tools') | |
.addItem('Show Document Path', 'listParentFolders') | |
.addToUi(); | |
} | |
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
/* Drop all Primary Key constraints */ | |
DECLARE @name VARCHAR(128) | |
DECLARE @constraint VARCHAR(254) | |
DECLARE @SQL VARCHAR(254) | |
SELECT @name = (SELECT TOP 1 TABLE_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'PRIMARY KEY' ORDER BY TABLE_NAME) | |
WHILE @name IS NOT NULL | |
BEGIN | |
SELECT @constraint = (SELECT TOP 1 CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE constraint_catalog=DB_NAME() AND CONSTRAINT_TYPE = 'PRIMARY KEY' AND TABLE_NAME = @name ORDER BY CONSTRAINT_NAME) |
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 @dropAllConstraints NVARCHAR(MAX) = N''; | |
SELECT @dropAllConstraints += N' | |
ALTER TABLE ' + QUOTENAME(OBJECT_SCHEMA_NAME(parent_object_id)) | |
+ '.' + QUOTENAME(OBJECT_NAME(parent_object_id)) + | |
' DROP CONSTRAINT ' + QUOTENAME(name) + ';' | |
FROM sys.foreign_keys; | |
EXEC sp_executesql @dropAllConstraints |
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
using System.Collections.Generic; | |
using System.IO; | |
using Newtonsoft.Json; | |
var pathToSeedData = Path.Combine(Directory.GetCurrentDirectory(), "Data", "duck_seed.json"); | |
var dataSet = File.ReadAllText(pathToSeedData); | |
var seedData = JsonConvert.DeserializeObject<List<Duck>>(dataSet); |
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
// Thank you StackOverflow!!! | |
// http://stackoverflow.com/questions/7099938/jquery-ui-dialog-behaves-unpredictably | |
var original = $('#dialogId')[0]; | |
var clone = $(original).clone().attr('id', 'dialogIdClone'); | |
var saveHtml = $(original).html(); | |
$(original).html(''); | |
$(clone).dialog({ | |
... // other options | |
open: function (){ | |
// add any dynamic behavior you need to the dialog here |
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
"C:\Program Files (x86)\IIS Express\appcmd.exe" set config /section:system.webServer/fastCGI /+[fullPath='"C:\Program Files (x86)\PHP\php-cgi.exe"'] | |
"C:\Program Files (x86)\IIS Express\appcmd.exe" set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='"C:\Program Files (x86)\PHP\php-cgi.exe"',resourceType='Unspecified'] |
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
# load rbenv if available | |
if command -v rbenv >/dev/null; then | |
eval "$(rbenv init - zsh --no-rehash)" | |
fi |
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
var jsonData = JSON.parse(responseBody); | |
postman.setEnvironmentVariable('token', jsonData.data.JWT); |
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
SELECT c.name AS ColName, t.name AS TableName | |
FROM sys.columns c | |
JOIN sys.tables t ON c.object_id = t.object_id | |
WHERE c.name LIKE '%MyCol%'; |
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
openssl pkcs12 -export -out final_name.pfx -inkey private_key.key -in original_certificate.crt |