Table of Contents generated with DocToc
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
Task Scheduler | |
Name: Kill SteamApp on Shutdown or Restart | |
Trigger: | |
When: On an Event | |
Log: System | |
Source: USER32 | |
EventID: 1074 | |
Start a program: | |
Program/Script: taskkill | |
Arguments: /f /t /im Steam.exe |
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; | |
using System.Runtime.InteropServices; | |
// ReSharper disable SuspiciousTypeConversion.Global | |
// ReSharper disable InconsistentNaming | |
namespace VideoPlayerController | |
{ | |
/// <summary> | |
/// Controls audio using the Windows CoreAudio API | |
/// from: http://stackoverflow.com/questions/14306048/controling-volume-mixer |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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
To catch errors during script execution: | |
WHENEVER SQLERROR EXIT FAILURE |
connect to meteor instance:
meteor mongo <name>.meteor.com
remove login tokens:
db.users.update({}, {$set: {"services.resume.loginTokens": []}}, {multi: true})
logout:
exit
more info: https://www.meteor.com/blog/2014/04/09/heartbleed
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
nodejs is called differently on ubunto (for whatever reason) - https://github.com/FredrikNoren/ungit/issues/401 | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
sudo -H npm install -g ungit |
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
in the watch window or quickwatch: | |
"$exception": the current exception that is currently available. it has a much better debug experience in the quickwatch because it can look into the exception's type | |
"{num}#": eg "1#". this is a reference to an object with ObjectId. it acts as a weak-reference and does not affect the GC'ability of the object. http://blogs.msdn.com/b/zainnab/archive/2010/03/04/make-objectid-vstipdebug0015.aspx | |
"$ReturnValue": contains the return value from the last exited method. The autos-window contains a much better display of that. http://blogs.msdn.com/b/visualstudioalm/archive/2013/06/27/seeing-function-return-values-in-the-debugger-in-visual-studio-2013.aspx | |
"$user": displays the information about the current user - eg to check for permissions, impersonations, etc | |
"{number-variable},h": displays the variable as hex | |
"{number-variable},d": displays the variable as decimal/number |
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
BEGIN TRY | |
... | |
END TRY | |
BEGIN CATCH | |
ROLLBACK TRANSACTION; | |
THROW; | |
END CATCH |
void Main()
{
GetTypeFromList(new List<string>()).Dump();
GetTypeFromFunc((string s, int i) => true).Dump();
}
public Type GetTypeFromList<TType>(IEnumerable<TType> dummy)
{
return typeof(TType);