-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
450 lines (344 loc) · 32.7 KB
/
atom.xml
File metadata and controls
450 lines (344 loc) · 32.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Kai-Zen]]></title>
<link href="http://2moveit.com/atom.xml" rel="self"/>
<link href="http://2moveit.com/"/>
<updated>2015-01-19T22:07:59+01:00</updated>
<id>http://2moveit.com/</id>
<author>
<name><![CDATA[Kai Timmermann]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Rebuild and Debug Your Windows Services Without Hassle]]></title>
<link href="http://2moveit.com/blog/2015/01/17/rebuild-and-debug-your-windows-service-without-hassle/"/>
<updated>2015-01-17T00:00:00+01:00</updated>
<id>http://2moveit.com/blog/2015/01/17/rebuild-and-debug-your-windows-service-without-hassle</id>
<content type="html"><![CDATA[<p>Creating a windows service isn’t that complicated as there is a Visual Studio template and a [documentation] (<a href="http://msdn.microsoft.com/de-de/library/zt39148a%28v=vs.110%29.aspx">http://msdn.microsoft.com/de-de/library/zt39148a%28v=vs.110%29.aspx</a>) available. If you want to start and debug the service then you have to install and start the service first. On a rebuild you have to stop the service everytime as the files are in use. To get rid of this annoying task you can use the pre-build and post-build events. You can add those events in your project <code>properties</code> –> <code>Build events</code>.</p>
<p>In the pre-build event you just stop the service. In case of errors you just don’t care about it e.g. if the service already stopped.</p>
<pre><code>net stop NameOfMyService
Exit /b 0
</code></pre>
<p>In the post-build event you have to do a little bit more than just starting the service. On the first run you have to register the service first. But you cannot use the target/output directory directly. Visual Studio cleans the build folder on a rebuild and if you want to stop the service your service files cannot be found. You have to copy the files to a different location first. Then you can register the service with the installutil.exe. Place the installutil.exe within your repository. So your collegues can start right away. The last step is to start the service. Again don’t care about errors as the registration is just required once.</p>
<pre><code>"%systemroot%\System32\xcopy" "$(TargetDir)*.*" "$(ProjectDir)..\..\..\Build" /Y /E
"$(ProjectDir)..\..\..\Tools\InstallUtil\installutil.exe" "$(ProjectDir)..\..\..\Build\$(TargetFileName)"
net start NameOfMyService
Exit /b 0
</code></pre>
<p>Everyone can checkout your repository now and rebuild the solution without hassle.
Notice that I said rebuild and not start. You cannot use F5 in Visual Studio to start and debug the service. You have to attach the debugger to your service manually. The rebuild will just start the post-build event to register and start the service. Then open <code>Debug</code> –> <code>Attach to process…</code> and check <code>Show processes from all users</code>. Select your service process and <code>Attach</code>. Now you can set your breakpoints as required.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Change DebugType in Multiple C# projects.rb]]></title>
<link href="http://2moveit.com/blog/2014/08/13/change-debugtype-in-multiplecsproj/"/>
<updated>2014-08-13T21:15:27+02:00</updated>
<id>http://2moveit.com/blog/2014/08/13/change-debugtype-in-multiplecsproj</id>
<content type="html"><![CDATA[<p>To change settings of multiple C# projects is quite easy with <a href="https://www.ruby-lang.org">Ruby</a> and the <a href="https://rubygems.org/gems/nokogiri">Nokogiri gem</a>. The following script will change the DebugType of all Release configurations in multiple csproj files.</p>
<div><script src='https://gist.github.com/e0d7c30a04e955794dbe.js?file=Change_debugtype_in_csproj.rb'></script>
<noscript><pre><code>#encoding: utf-8
require 'Nokogiri'
desc "Change the DebugType of a configuration in multiple C# project files."
task :change_debug_type do
DEBUG_TYPE = 'pdbonly'
CONFIGURATION = 'Release'
PROJECT_DIR_REL = '../Source/**/*'
project_files(PROJECT_DIR_REL).each do |file_name|
change(file_name, CONFIGURATION, DEBUG_TYPE)
end
end
def project_files(project_dir_rel)
scriptDir = File.dirname(__FILE__)
Dir[ File.join(scriptDir, "#{project_dir_rel}/*.csproj")]
end
def change(file_name, configuration, debug_type)
puts '-------------------------------------------------------------------------------'
puts file_name
puts '-------------------------------------------------------------------------------'
puts
@doc = Nokogiri::XML(File.open(file_name))
namespace = "http://schemas.microsoft.com/developer/msbuild/2003"
nodes =@doc.xpath("//x:PropertyGroup","x" => namespace)
nodes.each do |node|
if node.values.to_s.include? configuration
puts node.values
type_node = node.at_xpath("x:DebugType", "x" => namespace)
if type_node == nil
new_node = Nokogiri::XML::Node.new("DebugType", @doc)
new_node.content = debug_type
node.add_child(new_node)
puts "Created new node: #{new_node}"
else
puts type_node
puts "Change #{type_node.content} to #{debug_type}"
type_node.content = debug_type
end
puts
end
end
File.open(file_name, 'w') {|f| f.puts @doc.to_xml }
puts '-------------------------------------------------------------------------------'
puts
end
task :default => [:change_debug_type]</code></pre></noscript></div>
<p>At first the script gets all csproj files which are actually xml files. Each file is loaded into a @doc variable by using Nokogiri. Then the document is queried with XPath for the PropertyGroup tags. Each tag is validated if it matches the specified configuration. If it matches a query for the DebugType tag is executed. If it isn’t found a new DebugType node with the specified DebugType value is created. Otherwise the available tag is changed. Finally the modified XML is written into the original project file.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Use a Condition to Copy Just Specific Assemblies]]></title>
<link href="http://2moveit.com/blog/2014/07/22/use-a-condition-to-copy-just-specific-assemblies/"/>
<updated>2014-07-22T20:13:17+02:00</updated>
<id>http://2moveit.com/blog/2014/07/22/use-a-condition-to-copy-just-specific-assemblies</id>
<content type="html"><![CDATA[<p>In my <a href="./blog/2014/07/21/use-one-code-base-for-autocad-and-bricscad/">previous post</a> I showed how to use conditional compilation symbols to switch between using statements for AutoCAD and BricsCAD. For both system the interface assemblies are referenced and <code>copy local</code> is set to <code>false</code>.
In a similar case where <code>copy local</code> is set to <code>true</code> you will notice that the referenced assemblies of both configuration are copied into the output directory. As we want to switch the whole system this isn’t what we want.
To avoid this you can use a condition so that just the assemblies of one configuration will be in you output directory.</p>
<p>Unload the project and open it in the editor window. Then add the condition to check the <code>DefineConstants</code> and to decide if the assembly will be included or not:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='xml'><span class='line'> <span class="nt"><Reference</span> <span class="na">Condition=</span><span class="s">"$(DefineConstants.Contains(BRICSCAD))"</span> <span class="na">Include=</span><span class="s">"BrxMgd"</span><span class="nt">></span>
</span><span class='line'> <span class="nt"><HintPath></span>lib\BrxMgd.dll<span class="nt"></HintPath></span>
</span><span class='line'> <span class="nt"><Private></span>False<span class="nt"></Private></span>
</span><span class='line'><span class="nt"></Reference></span>
</span></code></pre></td></tr></table></div></figure>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Use One Code Base for AutoCAD and BricsCAD]]></title>
<link href="http://2moveit.com/blog/2014/07/21/use-one-code-base-for-autocad-and-bricscad/"/>
<updated>2014-07-21T21:50:47+02:00</updated>
<id>http://2moveit.com/blog/2014/07/21/use-one-code-base-for-autocad-and-bricscad</id>
<content type="html"><![CDATA[<p><a href="https://www.bricsys.com">BricsCAD</a> form BricsSys supports the same API as <a href="http://www.autodesk.com/products/autocad/overview">AutoCAD</a> from Autodesk.
Same API but not the same interface. So how is it possible to use just one code base and support both cad systems?</p>
<p>First create a configuration for AutoCAD <code>Debug</code> and BricsCAD <code>DebugBricsCAD</code>. This will make it easy to start either AutoCAD or BricsCAD from Visual Studio as you can define which program should start in the project properties:
<img class="center" src="http://2moveit.com/images/posts/2014-07-21Settings.png">
To switch the interfaces in you source code you have to change the using statements depending on the cad system you want to use.
You can manage this with preprocessor statements:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="cp">#if BRICSCAD</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Teigha.DatabaseServices</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Teigha.Runtime</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Teigha.Geometry</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="k">using</span> <span class="nn">Bricscad.ApplicationServices</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Bricscad.Runtime</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Bricscad.EditorInput</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Application</span> <span class="p">=</span> <span class="n">Bricscad</span><span class="p">.</span><span class="n">ApplicationServices</span><span class="p">.</span><span class="n">Application</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Platform</span> <span class="p">=</span> <span class="n">Bricscad</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">PlatformDB</span> <span class="p">=</span> <span class="n">Teigha</span><span class="p">;</span>
</span><span class='line'><span class="cp">#else</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Autodesk.AutoCAD.DatabaseServices</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Autodesk.AutoCAD.Runtime</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Autodesk.AutoCAD.Geometry</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Autodesk.AutoCAD.ApplicationServices</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Autodesk.AutoCAD.EditorInput</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Autodesk.AutoCAD.Windows</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Application</span> <span class="p">=</span> <span class="n">Autodesk</span><span class="p">.</span><span class="n">AutoCAD</span><span class="p">.</span><span class="n">ApplicationServices</span><span class="p">.</span><span class="n">Core</span><span class="p">.</span><span class="n">Application</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">Platform</span> <span class="p">=</span> <span class="n">Autodesk</span><span class="p">.</span><span class="n">AutoCAD</span><span class="p">;</span>
</span><span class='line'><span class="k">using</span> <span class="nn">PlatformDB</span> <span class="p">=</span> <span class="n">Autodesk</span><span class="p">.</span><span class="n">AutoCAD</span><span class="p">;</span>
</span><span class='line'><span class="cp">#endif</span>
</span></code></pre></td></tr></table></div></figure>
<p>To switch the configuration you need to define the symbol BRICSCAD.
Go to <code>project properties</code> –> <code>Build</code> –> <code>General</code> –> <code>Conditional compilation symbols</code> and add <code>BRICSCAD</code> there. Make sure that the configuration <code>DebugBricsCAD</code> is selected. If you like you can add <code>AUTOCAD</code> as conditional compilation symbol to the <code>Debug</code> configuration. As we do not check this value it is not required here but if you later want to support <a href="http://www.nanocad.com">nanoCAD</a> from neosoft you might need it for the <code>#elseif</code>.
<img class="center" src="http://2moveit.com/images/posts/2014-07-21Constant.png">
By doing this the conditional compilation symbol is added in the project file (.proj) to the tag <code><DefineConstants></code> and it will be used for the preprocessor statements.</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
</pre></td><td class='code'><pre><code class='xml'><span class='line'><span class="nt"><PropertyGroup</span> <span class="na">Condition=</span><span class="s">"'$(Configuration)|$(Platform)' == 'DebugBricsCAD|AnyCPU'"</span><span class="nt">></span>
</span><span class='line'> <span class="nt"><DebugSymbols></span>true<span class="nt"></DebugSymbols></span>
</span><span class='line'> <span class="nt"><OutputPath></span>bin\DebugBricsCAD\<span class="nt"></OutputPath></span>
</span><span class='line'> <span class="nt"><DefineConstants></span>TRACE;DEBUG;BRICSCAD<span class="nt"></DefineConstants></span>
</span><span class='line'> <span class="nt"><DebugType></span>full<span class="nt"></DebugType></span>
</span><span class='line'> <span class="nt"><PlatformTarget></span>AnyCPU<span class="nt"></PlatformTarget></span>
</span><span class='line'> <span class="nt"><ErrorReport></span>prompt<span class="nt"></ErrorReport></span>
</span><span class='line'> <span class="nt"><CodeAnalysisRuleSet></span>MinimumRecommendedRules.ruleset<span class="nt"></CodeAnalysisRuleSet></span>
</span><span class='line'><span class="nt"></PropertyGroup></span>
</span></code></pre></td></tr></table></div></figure>
<p> Now you can start your implementation with one code base and start the cad systems as you like by just switching the configuration <code>Debug</code> and <code>DebugBricsCAD</code>.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[BricsCAD Does Not Load "Hello World" Command]]></title>
<link href="http://2moveit.com/blog/2014/07/20/bricscad-does-not-load-hello-world-command/"/>
<updated>2014-07-20T15:55:19+02:00</updated>
<id>http://2moveit.com/blog/2014/07/20/bricscad-does-not-load-hello-world-command</id>
<content type="html"><![CDATA[<h2>Problem</h2>
<p>BricsCAD does not show the command after loading the assembly with NETLOAD.</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="na">[CommandMethod("Go")]</span>
</span><span class='line'><span class="k">public</span> <span class="k">void</span> <span class="nf">Go</span><span class="p">()</span>
</span><span class='line'><span class="p">{</span>
</span><span class='line'> <span class="n">MessageBox</span><span class="p">.</span><span class="n">Show</span><span class="p">(</span><span class="s">"Hello world"</span><span class="p">);</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>
<!--more-->
<h2>Solution</h2>
<p>There is no API call in this file.
At least one command has to do something with the BricsCAD API. E.g write something to the console, open a transaction or just update the screen.</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='csharp'><span class='line'><span class="na">[CommandMethod("Go")]</span>
</span><span class='line'><span class="k">public</span> <span class="k">void</span> <span class="nf">Go</span><span class="p">()</span>
</span><span class='line'><span class="p">{</span>
</span><span class='line'> <span class="n">MessageBox</span><span class="p">.</span><span class="n">Show</span><span class="p">(</span><span class="s">"Hello world"</span><span class="p">);</span>
</span><span class='line'> <span class="n">Bricscad</span><span class="p">.</span><span class="n">ApplicationServices</span><span class="p">.</span><span class="n">Application</span><span class="p">.</span><span class="n">UpdateScreen</span><span class="p">();</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>
<p></p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Jenkins Startet Nach Update Nicht Mehr]]></title>
<link href="http://2moveit.com/blog/2014/06/28/jenkins-startet-nach-update-nicht-mehr/"/>
<updated>2014-06-28T00:00:00+02:00</updated>
<id>http://2moveit.com/blog/2014/06/28/jenkins-startet-nach-update-nicht-mehr</id>
<content type="html"><![CDATA[<h2>Problem</h2>
<p>Auf einem Windows Computer kann es vorkommen, dass Jenkins nach ein Update bei dem darauf folgenden Neustart nicht mehr startet.</p>
<h2>Lösung</h2>
<p>Erst in der Windows Ereignisanzeige die Protokolleinträge für Anwendungen und System löschen und darauf den Jenkins-Dienst neu starten.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Philips Hue Lampen Mit Bridge Koppeln]]></title>
<link href="http://2moveit.com/blog/2014/06/19/philips-hue-lampen-mit-bridge-koppeln/"/>
<updated>2014-06-19T00:00:00+02:00</updated>
<id>http://2moveit.com/blog/2014/06/19/philips-hue-lampen-mit-bridge-koppeln</id>
<content type="html"><![CDATA[<p>Mit den Philips Hue Lampen kann man schöne Lichtstimmungen erzeugen, doch es ist nicht immer ganz einfach alle Lampen zu koppeln. Lampen der 3ten Generation (runde Fernbedienung) können mit der Bridge gekoppelt werden. Am einfachsten geht es indem man alle Lampen mit einer Fernbedienung koppelt und darauf die Daten an die Bridge sendet:</p>
<!--more-->
<ol>
<li>Bridge Link Taste drücken</li>
<li>Fav 1 Taste und Einschalttaste der Fernbedienung in der Nähe der Bridge gleichzeitig drücken und halten. Die Bridge Leuchte blinkt und schaltet sich aus.</li>
<li>Einschalttaste der Fernbedienung jeweils in der Nähe der einzelnen, am Strom angeschlossenen, Lampen drücken und halten bis die jeweilige Lampe aufleuchtet-</li>
<li>Bridge Link Taste drücken.</li>
<li>Einschalter der Fernbedienung gedrückhalten (nicht mehr die Fav 1 Taste!) bis die Bridge blinkt.</li>
<li>Hue App starten und ggf. nach der Bridge “suchen”. Dazu ggf auf Nachfrage nocheinmal die Bridge Links Taste drücken. Lampen ebenfalls suchen lassen.</li>
</ol>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Prevent Command Prompt's Auto Close]]></title>
<link href="http://2moveit.com/blog/2014/06/04/prevent-command-prompts-auto-close/"/>
<updated>2014-06-04T00:00:00+02:00</updated>
<id>http://2moveit.com/blog/2014/06/04/prevent-command-prompts-auto-close</id>
<content type="html"><![CDATA[<p>As I want to start a specific task of a rake script with a double-click in windows I had to created a batch file to start the task:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="n">rake</span> <span class="o">-f</span> <span class="n">rakefile</span><span class="p">.</span><span class="n">rb</span> <span class="n">task_name</span>
</span></code></pre></td></tr></table></div></figure>
<p>Either if the task fails or not the command window will close.</p>
<p>To solve this you have to add <code>pause</code> and <code>call</code> the rake script. As I’m just interested in the output in case of an error I check the errorlevel for it.</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="n">call</span> <span class="n">rake</span> <span class="o">-f</span> <span class="n">rakefile</span><span class="p">.</span><span class="n">rb</span> <span class="n">unit_tests</span>
</span><span class='line'><span class="k">if</span> <span class="k">%</span><span class="n">ERRORLEVEL</span><span class="p">%</span> <span class="p">==</span> <span class="n">1</span> <span class="p">(</span>
</span><span class='line'> <span class="n">pause</span>
</span><span class='line'><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[E-Mails Verschlüsseln Mit S/MIME]]></title>
<link href="http://2moveit.com/blog/2014/05/30/e-mails-verschluesseln-mit-smime/"/>
<updated>2014-05-30T00:00:00+02:00</updated>
<id>http://2moveit.com/blog/2014/05/30/e-mails-verschluesseln-mit-smime</id>
<content type="html"><![CDATA[<p>Unverschlüsselte E-Mails sind wie Postkarten. Jeder könnte sie lesen. Auch wenn keine wichtigen Informationen in ihnen stehen, so sollte man seine Privatsphäre nicht einfach ohne Weiteres aufgeben. Viel zu viel steht auf dem Spiel, denn jeder hat schon mal den paraphrasiert Satz von Benjamin Franklin gehört: „Wer die Freiheit aufgibt um Sicherheit zu gewinnen, der wird am Ende beides verlieren.“ Dabei ist es garnicht schwer oder viel Aufwand E-Mails zu verschlüsseln, wie die nächsten sechs Schritte zeigen.</p>
<!--more-->
<ol>
<li><p>Zuerst bei <a href="http://comodo.com">Comodo</a> ein kostenloses Zertifikat (Klasse 1) für die zu verschlüsselnde E-Mailadresse bestellen.</p></li>
<li><p>Den Link in der E-Mail von Comodo öffnen. Dadurch wird das Zertifikat im jeweiligen Standardbrowser installieren.</p></li>
<li><p>Als nächstes das Zertifikat exportieren und an einer sicheren Stelle aufbewahren, da ohne dieses Zertifikat die damit verschlüsselten E-Mails nicht mehr gelesen werden können. Beim Exportieren sollte ein sehr starkes Passwort verwendet werden, um auszuschließen, dass jemand Anderes dieses verwenden kann sollte es doch einmal verloren gehen:</p>
<h3>Firefox</h3>
<ul>
<li><code>Extras</code> –> <code>Einstellungen</code> –> <code>Erweitert</code> –> <code>Zertifikate anzeigen</code></li>
<li>Eigenes Zertifikat unter <code>Ihre Zertifikate</code> auswählen und als PKCS12 Datei (*.p12) <code>Sichern...</code>. Dabei ein starkes Passwort verwenden, da dieses der <a href="#PKV"><em>Private Schlüssel</em></a> ist.</li>
<li>Zusätzlich unter <code>Zertifizierungsstellen</code> das <em>COMODO Client Athentication and Secure Email CA Zertifikat</em> unter <em>The USERTRUST Network</em> <code>Exportieren...</code> und als X.509-Zertifikat (.crt) speichern.</li>
</ul>
<h3>Internet Explorer</h3>
<ul>
<li><code>Internetoptionen</code> –> <code>Inhalte</code> –> <code>Zertifikate</code></li>
<li>Unter <code>Eigene Zertifikate</code> das eigenes Zertifikat <code>Exportieren</code> –> <code>Weiter</code> –> <em>Ja, privaten Schlüssel exportieren</em> auswählen und <code>Weiter</code> –> <em>Privater Informationsaustausch -PKCS #12 (.PFX)</em> auswählen, <em>Wenn möglich, alle Zertifikate im Zertifizierungspfad einbeziehen</em> aktivieren und <code>Weiter</code> –> Starkes Kennwort festlegen, da der <a href="#PKV"><em>Private Schlüssel</em></a> mit exportiert wird und <code>Weiter</code> –> Dateiname wählen und <code>Weiter</code> –> <code>Fertig stellen</code></li>
<li>Zusätzlich unter <code>Zwischenzertifizierungsstellen</code> das <em>COMODO Client Athentication and Secure Email CA Zertifikat</em> <code>Exportieren...</code> und als X.509-Zertifikat (.crt) speichern.</li>
</ul>
<p>Neben der Sicherung des Zertifikates wird das exportierte Zertifikat benötigt, um auf anderen Geräten das selbe Zertifikat verwenden zu können. Das Comodo Zertifikat wird nur benötigt wenn die Comodo Zertifizierungsauthorität noch nicht auf einem Gerät vorhanden ist, wie z.B. dem iPhone.</p></li>
<li><p>Exportierte Zertifikate an eigene E-Mailadresse senden.</p></li>
<li><p>E-Mail auf dem Smartphone/Tablet öffnen und Zertifikat durch anklicken installieren. Das eigene Zertifikat erscheint als vertrauenswürdig sobald Comodo-Zertifikat installiert ist. <a href="#CA">Weitere Informationen</a></p></li>
<li><p>In den iOS <code>Einstellungen</code> des E-Mailkontos unter <code>Erweiterte Einstellungen</code>, ganz unten, <code>S/MIME</code> aktivieren (signieren und verschlüsseln)</p></li>
</ol>
<p>Das wars. Wenn man jetzt eine Email versendet, dann wird sie signiert. Der Empfänger sieht an einem Icon (Outlook/iOS), dass die E-Mail nicht manipuliert wurde, vorausgesetzt ein Angreifer ist nicht an das private Zertifikat gelangt.</p>
<p>Besitzt ihr das öffentliche Zertifikat einer E-Mailadresse, so wird die Nachricht der E-Mail automatisch verschlüsselt und nur der Empfänger kann sie entschlüsseln , da er ja den privaten Schlüssel besitzt.</p>
<p>Dar öffentliche Zertifikat kann immer an die E-Mail gehangen werden. Die Vertrauenswürdigkeit wird ja von Comodo bestätigt und so kann jeder mit eurem öffentlichen Zertifikat verschlüsselte Nachrichten an euch senden.
Ein Zertifikat E-Mail kann man bei iOS durch klick auf den Namen mit dem Signaturicon vertrauen. Bei Outlook ist darauf achten, dass der Kontakt auch als Kontakt gespeichert ist. Andernfalls wird das Zertifikat desjenigen nicht gespeichert und man kann keine Nachrichten an denjenigen verschlüsselt versenden.</p>
<h2>Weitere Infos</h2>
<h3>Warum sind Datenschutz und Privatsphäre wichtig?</h3>
<p>Ein wirklich ansenlich gemachtest Video zeigt, <a href="http://youtu.be/iHlzsURb0WI">warum jeder lieber etwas zu verbergen hat</a>.
<a href="http://youtu.be/iHlzsURb0WI"><img src="http://img.youtube.com/vi/iHlzsURb0WI/0.jpg" alt="Überwachung" /></a></p>
<h3>S/MIME</h3>
<p>S/MIME arbeitet nach dem Public-Key-Verfahren. Es wird damit jedoch nur der Inhalt der E-Mail, jedoch nicht der Header und die Metadaten, verschlüsselt. Da im Header die Betreffzeile steht, sollten dort keine wichtigen Daten stehen. Natürlich hilft alles nichts wenn z.B. durch einen Trojaner oder Keylogger die Eingaben angefangen werden.</p>
<h3><a name="PKV"></a>Public-Key Verfahren</h3>
<p>Beim Public-Key-Verfahren werden zwei Schlüssel verwendet. Ein privater Schlüssel und ein öffentliche Schlüssel bilden ein sogenanntes Schlüsselpaar. Der öffentliche Schlüssel kann ohne Bedenken an jeden verteilt werden. Er wird dazuverwendet um Nachrichten an den Besitzer des zugehörigen privaten Schlüssels zu verschlüsseln. Nur der Besitzer des privaten Schlüssels kann die verschlüsselte Nachricht wieder entschlüsseln. Damit man auch den richtigen öffentlichen Schlüssel von jemanden nutzt, und nicht den eines Angreifers, vertraut man nur Schlüsseln, die durch Andersrum kann mit dem privaten Schlüssel eine Nachricht signiert werden. Mit dem öffentlichen Schlüssel kann nun überprüft werden ob die Nachricht wirklich vom Absender stammt und nicht manipuliert wurde.</p>
<h3><a name="CA"></a>Comodo, Certification Authority (CA) und das Web of trust</h3>
<p>Comodo dient sozusagen als Bürge und bestätigt mit dem Klasse 1 Zertifikat, dass es diese E-Mailadresse gibt, denn Comodo hat die E-Mail für das herunterladen des eigenen Zertigikates an diese E-Mailadresse gesendet. Das Zertifikat welches man bekommt ist mit dem Privaten Schlüssel, den nur Comodo besitzt, signiert. Als CA ist das Comodo Zertifikat in der Regel schon auf dem Computer installiert und es wird diesem vertraut. Andernfalls muss dieses Zertifikat installiert und ihm vertraut werden. Zertifikate, die von Comodo signiert wurden, wird darauf automatisch vertraut. Prüft man einen manuell den Fingerprint eines Zertifikates, so kann man einem Zertifikat auch manuell vertrauen und ggf. einstellen, dass Zertifikate, die mit diesem Zertifikat signiert wurden ebenfalls vertraut werden kann. So kann man ein Netzwerk des Vertrauens aufbauen.</p>
<h3>Schlüsselrückruf</h3>
<p>Sollte einmal ein Schlüssel verloren gehen, so kann man ihn unter Angabe des Rückrufpasswortes <a href="https://secure.comodo.com/products/!SecureEmailCertificate_Revoke">zurückrufen</a>. Diesem Zertifikat gilt dann nicht mehr als vertrauenswürdig.</p>
<h2>Haftungsausschluss</h2>
<p>Diese Dokumentation ist nach bestem Wissen und Gewissen erstellt worden, stellt die Verschlüssellung jedoch vereinfacht dar, um möglichst jedem zuermöglichen eine E-Mail Verschlüsselung einzurichten. 100% Sicherheit gibt es nicht. Insbesondere durch Fehlverhalten wie der Verlust des Privatenschlüssels etc. kann dieser Schutz ausgehebelt werde. Die Anwendung der Anleitung geschieht auf, eigene Gefahr. Der Autor kann nicht auf Grund von Fehlern in der Anleitung für etwaige Schäden haftbar gemacht werden.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Git Extensions: Syntax Error Near Unexpected Token]]></title>
<link href="http://2moveit.com/blog/2014/05/17/Git_Extensions_Syntax_error_near_inexpected_token/"/>
<updated>2014-05-17T00:00:00+02:00</updated>
<id>http://2moveit.com/blog/2014/05/17/Git_Extensions_Syntax_error_near_inexpected_token</id>
<content type="html"><![CDATA[<h2>Problem</h2>
<p>If you try to push a repository you may get the message:</p>
<blockquote><p>“… syntax error near unexpected token ‘(”</p></blockquote>
<!--more-->
<h2>Solution</h2>
<p>Change the “\” to just “\” in the file <strong>C:\Users< UserName >.gitconfig</strong></p>
<h3>Wrong:</h3>
<pre><code>helper = !\\\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\\\"
</code></pre>
<h3>Correct:</h3>
<pre><code>helper = !\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\"
</code></pre>
]]></content>
</entry>
</feed>