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
@ECHO off | |
cls | |
:start | |
ECHO. | |
ECHO 1. Visual Studio 2019 | |
ECHO 2. VS Code | |
ECHO 3. Sql Server Management Studio | |
ECHO. | |
set choice= |
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
Open Search/Replace (CTRL+H), change settings to Regular Expressions (click .*) | |
Enter Find: ^(.+\n)(?=(?:.*\n)*?\1) | |
Leave Replace blank | |
Press CTRL+ALT+Enter | |
Profit! |
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
# After logging in as a normal user, change to the su account, but don't use | |
# the '-' to preserve display values. Finally, append your users xauth settings | |
# onto your own, which will include the "cookie" for X11 forwarding | |
sudo su | |
xauth add $(xauth -f ~[user]/.Xauthority list|tail -1) |
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
git filter-branch --index-filter 'git rm --cached --ignore-unmatch [file_name]' HEAD |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
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
mkdir -p [path_to_new_directory] && git archive master | tar -x -C [path_to_new_directory] |
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
$location = "[path_to_new_folder]"; git archive master --format zip -o "$location.zip"; expand-archive "$location.zip" -DestinationPath $location; ri "$location.zip" | |
# Expand-Archive will auto-create destination folder. | |
# Can use path such as $HOME/Projects/my_project to shortcut. |
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 |
NewerOlder