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
Type into Command line: | |
sudo nano /boot/cmdline.txt | |
add onto the end of the line “usbhid.mousepoll=0” without quotes (note if still slow on 0 try 1) | |
save the file (ctrl+o) | |
then: sudo reboot |
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
Enterprise: NJVYC-BMHX2-G77MM-4XJMR-6Q8QF | |
Professional: KBJFW-NXHK6-W4WJM-CRMQB-G3CDH | |
Keys are generic ones. These are the same from MSDN account. | |
Product Key : -6Q8QF | |
Validity : Valid | |
Product ID : 00369-90000-00000-AA703 | |
Advanced ID : XXXXX-03699-000-000000-00-1032-9200.0000-0672017 |
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 | |
MemoryUsage.DatabaseName, | |
SUM(MBUsed) | |
FROM | |
( | |
SELECT DB_NAME(t.dbid) AS DatabaseName, SUM(size_in_bytes/(1024*1024)) AS MBUsed | |
FROM sys.dm_exec_cached_plans AS p | |
CROSS APPLY sys.dm_exec_sql_text(p.plan_handle) AS t | |
WHERE t.dbid < 32767 | |
GROUP BY t.dbid |
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
RESTORE DATABASE <database name> WITH RECOVERY |
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
-- change the database > properties > options > recovery model to "simple" in database | |
-- or use this ALTER DATABASE testdb SET RECOVERY SIMPLE; | |
USE {DatabaseName} | |
DBCC SHRINKFILE ('{Log file logical 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
Expression<Func<ProductController, ActionResult>> add = (p => p.Add(null)); | |
Expression<Func<ProductController, ActionResult>> edit = (p => p.Edit(null)); | |
var action = (Id == 0) ? add : edit; | |
string actionMethodName = ((MethodCallExpression)action.Body).Method.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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<httpRedirect enabled="true" destination="https://[HTTPSSITEURL]$S$Q" exactDestination="true" httpResponseStatus="Permanent" /> | |
</system.webServer> | |
</configuration> |
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 | |
SO.NAME AS "Table Name" | |
, SC.NAME AS "Column Name" | |
, SM.TEXT AS "Default Value" | |
FROM | |
dbo.sysobjects SO | |
INNER JOIN | |
dbo.syscolumns SC | |
ON | |
SO.id = SC.id |
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 | |
t.NAME AS TableName, | |
i.name as indexName, | |
p.[Rows], | |
sum(a.total_pages) as TotalPages, | |
sum(a.used_pages) as UsedPages, | |
sum(a.data_pages) as DataPages, | |
(sum(a.total_pages) * 8) / 1024 as TotalSpaceMB, | |
(sum(a.used_pages) * 8) / 1024 as UsedSpaceMB, | |
(sum(a.data_pages) * 8) / 1024 as DataSpaceMB |
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
public static List<string> ToCSV(IDataReader dataReader, bool includeHeaderAsFirstRow, string separator) | |
{ | |
List<string> csvRows = new List<string>(); | |
StringBuilder sb = null; | |
if (includeHeaderAsFirstRow) | |
{ | |
sb = new StringBuilder(); | |
for (int index = 0; index < dataReader.FieldCount; index++) | |
{ |