-
List all modified file names
- git whatchanged --since '12/01/2016' --oneline --name-only --pretty=format: | sort | uniq
- git log --since="4 day ago" --name-only --pretty=format: | sort -u
- git whatchanged --since '12/01/2016' --until '12/06/2016' --oneline --name-only --pretty=format: | sort | uniq
-
Stash
- git stash
- git stash list (Get all stash(s))
- git stash pop (Reapply stash and remove)
-
git stash apply (Reapply stash and keep copy)
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
--Check for Replication EXECUTE sys.sp_helpreplicationdb @dbname = {DBName}, -- sysname @type = pub -- sysname |
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
function HumanDogYears(form) { | |
var HumanYears = form.inYears.value; | |
if (HumanYears >= 21) { | |
dy = (HumanYears - 21) / 4 + 2; | |
} else { | |
dy = HumanYears / 10.5; | |
} | |
var hdy = 0; | |
if (HumanYears >= 2) { | |
hdy = 21 + ((HumanYears - 2) * 4); |
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
SELECT publisher_db, COUNT(1) FROM distribution.dbo.MSarticles | |
GROUP BY publisher_db | |
ORDER BY COUNT(1), publisher_db |
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 {PublicationDatabaseName} | |
GO | |
EXEC sp_droppublication @publication = N'<Publication name>' | |
USE master | |
GO | |
EXEC sp_replicationdboption @dbname = N'<Publication database name>', @optname = N'publish', @value = N'false' |
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 master | |
SELECT * FROM msdb.dbo.restorehistory WHERE destination_database_name LIKE '%DBNm%' ORDER BY restore_date DESC |
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
echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'` |
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
PRINT 'Backing Up DBName' | |
BACKUP DATABASE {DBName} TO DISK = 'D:\BackupFolder\DBName_Restore.bak'; |
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
EXEC master.dbo.sp_replicationdboption @dbname = {DBName}, @optname = N'publish', @value = N'false' |