I’ve been using Razor Templates to generate text blobs. For some reason, my razor templates stopped generating namespaces based on the file path and added underscores into the class name. I did the following to fix this issue.
Add this to the top of the cshtml file:
So the top of the file might look similar to this declaration:
@* Generator : Template TypeVisibility : Internal GeneratePrettyNames: true
GenerateAbsolutePathLinePragmas: true *@
Reference: Codeplex Link
Install the node modules and web driver
npm install protractor
And then running protractor against a conf.js file.
I’m assuming the command prompt is opened in the project root.
After installing an extension, I sometimes get the following error
A problem occurred when loading the Microsoft Visual Studio menu. To fix this problem, run 'devenv.exe /resetsettings' from the command prompt. Note: this command resets your environment settings.
Open up Developer Command Prompt and try the following:
and then start Visual Studio. If you still get an error, try starting it from the Administrator Command Prompt with the command
If connecting to us.archive.ubuntu.org is slow and the OS installation is new, it’s probably because the DNS is resolving the IPv6 address instead of IPv4.
To correct, edit the /etc/gai.conf file and un-comment the following line:
precedence ::ffff:0:0/96 100
Reference: Ask Ubuntu
Set-AuthenticodeSignature c:\foo.ps1 @(Get-ChildItem cert:\CurrentUser\My -codesign)
Reference: Signing Powershell Scripts
Run the following to install:
sudo apt-get install monit
To configure, open the file
sudo nano /etc/monit/monitrc
I added the following to the file to monitor the user and system CPU usage. Not sure if this will work yet.
check system localhost
start program = "/opt/zimbra/bin/zmcontrol start"
as uid zimbra and gid zimbra
stop program = "/opt/zimbra/bin/zmcontrol stop"
as uid zimbra and gid zimbra
if cpu usage (system) > 99% for 5 cycles then restart
if cpu usage (user) > 99% for 5 cycles then restart
Setup the Http server so you can check status remotely
set httpd port 2812
use address ipaddress
If you have csf installed, make sure you update your csf config file to open up port 2812
and then to reload csf
Check monit status
In Explorer, [shift] + right click on the file and the option to copy the file path should appear.
The newest version of Csf emails the admin everytime any error or warning. To disable, add entries to the csf.pignore file in /etc/csf.
Usually, adding the user account will disable most of the alerts. Example:
You need to restart both csf and lsd afterwards.
service lsd restart
Use Process Explorer and then used the ‘Find’ function to search for a directory or file path. So.. go to
- Open Find in the menu strip bar
- Click on ‘Find Handle or DLL
- Type in file path or directory.
If using an older version of SQL Server,
Newer versions should use the dm_db_index_physical_stats
DECLARE @db_id SMALLINT;
DECLARE @object_id INT;
SET @db_id = DB_ID(N'AdventureWorks');
SET @object_id = OBJECT_ID(N'Production.Customers');
IF @object_id IS NULL
PRINT N'Invalid object';
FROM sys.dm_db_index_physical_stats(@db_id, @object_id, NULL, NULL , 'DETAILED') AS IPS;