Skip to content

Instantly share code, notes, and snippets.

View CADbloke's full-sized avatar
💭
tired

Ewen Wallace CADbloke

💭
tired
View GitHub Profile
@CADbloke
CADbloke / VisualStudioSolutionSLNstyler.xml
Last active October 18, 2024 22:31
Notepad++ Syntax Highlighting for visual Studio .sln Solution files. Exported from NP++ 6.3.2To use, save this gist as an XML file, NP++ Language menu ==> Define your Language ==> click Import in the window that just popped up...then change the colo(u)rs in the pop-up window dialogues to something that offends you less.
<NotepadPlus>
<UserLang name="SLN" ext="sln" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">03 04 00# 01 02</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@CADbloke
CADbloke / VisualStudioProjectNPPStyler.xml
Last active February 13, 2018 20:59
Notepad++ Syntax highlighting Visual Studio Project Files (.csproj & .vbproj) and also .vstemplate files. I'm sure I didn't catch every keyword so you may have a little adding to do. Just make sure you add enough closing braces in the Styler. Also, no I'm not colour-blind. I'm not a designer either. Nyah.Instructions for the styler at http://udl…
<NotepadPlus>
<UserLang name="VS Projects" ext="csproj vbproj vstemplate targets proj" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="yes" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="yes" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00 01 02 03&lt;!-- 04--&gt;</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@CADbloke
CADbloke / AutoLisp-NPP-UDL.xml
Last active June 12, 2024 14:28
Notepad++ Syntax Highlighting for AutoCAD AutoLisp. Refer to a discussion at http://www.theswamp.org/index.php?topic=40225.0 for why ... kinda. this version has code folding and different types of highlighting for 8 miscategorized types of AutoLISP keywords. As with most thing software related, it is a work in progress and could use some more co…
<NotepadPlus>
<UserLang name="AutoLISP" ext="lsp lisp dcl" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="no" Keywords6="yes" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00; 01 02 03;| 04|;</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@CADbloke
CADbloke / WindowsFormToXaml.cs
Created January 21, 2015 02:36
Windows Forms to XAML Converter
// based on http://robrelyea.wordpress.com/2007/02/10/winforms-xaml/
// converted to an Extension Method by @CADbloke
// a list: http://msdn.microsoft.com/en-us/library/ms750559(v=vs.110).aspx
// here's moar code:http://wf2wpf.codeplex.com/SourceControl/latest but it converts source files, not actual controls.
// Here's a site that does code too http://www.win2wpf.com/
// http://www.codeproject.com/Articles/25795/Creating-the-Same-Program-in-Windows-Forms-and-WPF
// ReSharper disable SpecifyACultureInStringConversionExplicitly
using System;
@CADbloke
CADbloke / UnVBA for AutoCAD
Created March 30, 2015 23:40
Unloads VBA applications from AutoCAD 64-bit installations preversion 2014 so it can resume normal speed. See http://adndevblog.typepad.com/autocad/2012/05/64-bit-vba-performance-issue.html
(defun Get-VBA-Project-list (/ ACAD VBAO PRO N NAMES)
(vl-load-com)
(if (and
(setq ACAD (vlax-get-acad-object))
(setq VBAO (vla-get-vbe ACAD))
(setq PROs (vlax-get VBAO "VBProjects"))
) ;_ -and
(repeat (setq N (vla-get-count PROs))
(setq PRO (vla-item PROs N)
@CADbloke
CADbloke / ReBracerIndents.xml
Last active January 15, 2016 07:49
ReBracer(https://visualstudiogallery.msdn.microsoft.com/410e9b9f-65f3-4495-b68e-15567e543c58) is awesome but it doesn't export any indent settings. It does, however, import them so here they are. Add these under `<ToolsOptionsCategory name="TextEditor">` and ReBracer will import them into your settings. See the FAQ at https://github.com/SLaks/Re…
<ToolsOptionsSubCategory name="Basic">
<PropertyValue name="IndentSize">4</PropertyValue>
<PropertyValue name="IndentStyle">2</PropertyValue> <!-- 0= Block 1= None 2= Smart https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.package.indentingstyle.aspx -->
<PropertyValue name="InsertTabs">false</PropertyValue>
<PropertyValue name="TabSize">4</PropertyValue>
<PropertyValue name="VirtualSpace">false</PropertyValue>
<PropertyValue name="WordWrap">true</PropertyValue>
</ToolsOptionsSubCategory>
<ToolsOptionsSubCategory name="C/C++">
<PropertyValue name="IndentSize">4</PropertyValue>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
// all the libraries that we are using
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
@CADbloke
CADbloke / gist:4d61fdfcf2ba942f4f10
Created February 12, 2016 03:37 — forked from hanishi/gist:7139122
PipeStream with Rx that works!
using System;
using System.IO;
using System.IO.Pipes;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security.AccessControl;
using System.Security.Principal;