Skip to content

Instantly share code, notes, and snippets.

View mrcaron's full-sized avatar
👾
Typing typing typing

Michael Caron mrcaron

👾
Typing typing typing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mrcaron on github.
  • I am radman (https://keybase.io/radman) on keybase.
  • I have a public key ASCTiYxWf2BHH6SnoN6dKsGNXXvOigfsFPNemPP-vvyCkwo

To claim this, I am signing this object:

@mrcaron
mrcaron / TAP_Task_Problem_Matcher.json
Created January 13, 2017 22:29
VSCode TAP task problem matcher
"problemMatcher" : {
"owner": "TAP",
"fileLocation" : "relative",
"pattern" : [
{
"regexp": "^#\\s+(Failed test '.*')",
"message": 1
},
{
"regexp": "^#\\s+at (.*) line (\\d+)",
@mrcaron
mrcaron / TfsTeamChatNotification.js
Created November 1, 2016 16:54
TFS 2015 Team Chat Notification Tampermonkey
// ==UserScript==
// @name TFS Team Room notifications in Chrome
// @namespace http://solidworks.com
// @version 0.51
// @description Getting tired of switching back and forth between a browser and Visual Studio...just to see if you have any chat notifications? Use this script, and get your notifications directly on your desktop!
// @match http://sw-dev-tfs:8080/tfs/_rooms*
// @copyright 2016+, Michael Caron
// ==/UserScript==
// uncomment to debug
@mrcaron
mrcaron / Radman_Dev_Box.ps1
Last active October 19, 2020 21:11
Radman Dev Box
# use http://bit.ly/radboxstarter4 as the link to this raw file
# Before using this script, make sure to turn on developer mode and insider builds and restart.
Set-WindowsExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Install-WindowsUpdate
#Enable-RemoteDesktop
cinst -y chocolatey
cinst -y googlechrome
@mrcaron
mrcaron / PowershellSnippets.ps1
Created July 30, 2013 19:24
Powershell snippets
# First N in file listing
function doSomething {}
ls $directory | select -first 10 | %{ &doSomething }
# Shutdown a list of machines with a name scheme of "machine-prefix-", numbered from 1-12
(0..12) | %{ shutdown -r -t 0 -f -m $("machine-prefix" + "{0:D2}" -f $_) }
@mrcaron
mrcaron / SingletonTemplate.hpp
Last active December 11, 2015 21:49
Working on a singleton implementation
namespace Utils
{
template <class T>
class Singleton
{
public:
static T& Instance()
{
if (MInstance == 0)
MInstance = new T();
@mrcaron
mrcaron / vcpp_property_macros.h
Created February 1, 2012 15:00
VCPP STD::Map-backed Property Macros
#define _UNICODE
#define _map_property(_type, _name, _map) \
_type Get##_name() { ASSERT( K_##_name > -1 ); return _map[K_##_name]; } \
void Set##_name( _type val ) { ASSERT( K_##_name > -1); _map[K_##_name] = val; } \
__declspec(property(get=Get##_name, put=Set##_name)) _type _name
typedef std::map<int, wstring> wstrmap;
class myClass
{
@mrcaron
mrcaron / utf16_2_ascii.py
Created May 10, 2011 15:39
Python UTF-16 to Ascii file converter
import codecs
import sys
import os
if __name__ == "__main__":
lines = ''
with codecs.open(sys.argv[1], 'r', 'utf-16') as f:
lines = f.read()
os.rename(sys.argv[1], sys.argv[1] + '_utf16')
with codecs.open(sys.argv[1], 'w', 'ascii') as w:
@mrcaron
mrcaron / InterestingWindowsErrors.md
Created January 6, 2011 20:35
Windows error descriptions that may be hard to find

Out of heap resources allocated for SolidWorks gives:
GetLastError() == 0x00000486 "The current process has used all of its system allowance of handles for Window Manager objects."

Out of heap resources due to other applications using a ton of windows gives: GetLastError() == 0x00000008 "Not enough storage is available to process this command."

@mrcaron
mrcaron / .vimrc
Created September 21, 2010 13:32
.vimrc
# .vimrc
filetype off
filetype plugin indent on
set nocompatible
set modelines=0
set tabstop=4