-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex-new.html
518 lines (355 loc) · 14.7 KB
/
index-new.html
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
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Zer0day Blog</title>
<meta name="theme-color" content="#222222" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/header.js"></script>
<script src="/js/toc.js"></script>
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/theme.css" rel="stylesheet">
<link href="/css/syntax.css" rel="stylesheet">
<link href="/css/font-awesome/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-93047547-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
WebFontConfig = {
google: {
families: ['Ubuntu::latin']
}
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
</script>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Zer0day Blog</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="/">/home</a></li>
<li><a href="/archive.html">/archive</a></li>
<li><a href="/tags.html">/tags</a></li>
<li><a href="/kb.html">/kb</a></li>
<li><a href="/tools.html">/tools</a></li>
<li><a href="/about.html">/about</a></li>
</ul>
</div>
</div>
</nav>
<div class="wrapper">
<div class="content">
<div class="container container-center">
<div class="row">
<div class="col-md-8">
<div class="well">
<div class="post-time">
<i class="fa fa-calendar"></i>
<time datetime='2017-06-01'>01 Jun 2017</time>
</div>
<div class="blog-index">
<h1 class="entry-title">
<a href="/index-new"></a>
</h1>
<h1 class="entry-title">
<a href="/2017/06/chef-cookbook-dependencies">Chef Cookbook Dependencies</a>
</h1>
<div class="entry-content"><p>Adding <code class="highlighter-rouge">solver :ruby, :required</code> to your berksfile will help with dependency resolutions</p>
</div>
</div>
<div class="post-meta">
<ul>
<li><a href="http://mrc0der.github.io/tag/chef">chef</a></li>
<li><a href="http://mrc0der.github.io/tag/berkshelf">berkshelf</a></li>
<li><a href="http://mrc0der.github.io/tag/troubleshooting">troubleshooting</a></li>
</ul>
</div>
<div class="post-time">
<i class="fa fa-calendar"></i>
<time datetime='2017-04-13'>13 Apr 2017</time>
</div>
<div class="blog-index">
<h1 class="entry-title">
<a href="/index-new"></a>
</h1>
<h1 class="entry-title">
<a href="/2017/04/aws-rds-mysql-ssl-connection">AWS RDS MySQL SSL Connection</a>
</h1>
<h3 class="post-descr">
This is how we RDS via SSL
</h3>
<div class="entry-content"><p>In order to connect to AWS RDS MySQL Using SSL, you must first have the AWS CA Cert locally so that you can validate the cert provided by the MySQL Server.</p>
<noscript><pre>400: Invalid request
</pre></noscript>
<script src="https://gist.github.com/bc05390b9ef0c470404da641ad399dd9.js"> </script>
</div>
</div>
<div class="post-meta">
<ul>
<li><a href="http://mrc0der.github.io/tag/mysql">mysql</a></li>
<li><a href="http://mrc0der.github.io/tag/rds">rds</a></li>
</ul>
</div>
<div class="post-time">
<i class="fa fa-calendar"></i>
<time datetime='2017-04-11'>11 Apr 2017</time>
</div>
<div class="blog-index">
<h1 class="entry-title">
<a href="/index-new"></a>
</h1>
<h1 class="entry-title">
<a href="/2017/04/protip-sql-server-snippets">ProTip - SQL Server Snippets</a>
</h1>
<div class="entry-content"><h4 id="disable-constraints-load-data-enable-constraints">Disable constraints, load data, Enable constraints</h4>
<p>Drop all constraint checks, disable triggers, delete all data, enable constraints, enable triggers.</p>
<noscript><pre>400: Invalid request
</pre></noscript>
<script src="https://gist.github.com/7df648e252515c6afaf572fe5a652bb6.js"> </script>
<h4 id="list-tables-and-their-sizes">List tables and their sizes</h4>
<noscript><pre>400: Invalid request
</pre></noscript>
<script src="https://gist.github.com/62abf06397b2e2324e557f3c4b94b7e5.js"> </script>
</div>
</div>
<div class="post-meta">
<ul>
<li><a href="http://mrc0der.github.io/tag/sqlserver">sqlserver</a></li>
<li><a href="http://mrc0der.github.io/tag/protip">protip</a></li>
</ul>
</div>
<div class="post-time">
<i class="fa fa-calendar"></i>
<time datetime='2017-04-11'>11 Apr 2017</time>
</div>
<div class="blog-index">
<h1 class="entry-title">
<a href="/index-new"></a>
</h1>
<h1 class="entry-title">
<a href="/2017/04/sql-server-drop-and-recreate-fks-pragmatically">SQL Server - Drop and Recreate FKs Pragmatically</a>
</h1>
<div class="entry-content"><p>While trying to load a large amount of data into SQL Server I was having an issue trying to truncate tables prior to loading the data, and I was unable to due to some FK constraints. My initial research led me to scripting the removal and creation of the FK constraints, but then i wondered, what if they changed. What if the end user added more that I was unaware of? My search then led me to a blog post where the original author was able to pragmatically backup, drop and recreate the FK Constraints. I modified the script a little to check for the existence of the FK_Details table first before trying to create it.</p>
<p>Once the sql below has run once, the FK_Details table will be populated with the <code class="highlighter-rouge">drop_script</code> and <code class="highlighter-rouge">create_script</code> columns with the proper SQL commands to create and drop the FKs. Im going to add a time stamp column to track when this was ran. This allows me to add this as part of my maintenance schedule, and track when things are done to the database.</p>
<p>If you want to actually execute on the drop or create, you’ll need to execute <code class="highlighter-rouge">EXEC sp_executesql @drop</code> then load your data, and re apply the FKs with <code class="highlighter-rouge">EXEC sp_executesql @create;</code></p>
<p>All credit goes to the <a href="https://www.mssqltips.com/sqlservertip/3347/drop-and-recreate-all-foreign-key-constraints-in-sql-server/">original author</a> <- blog post here</p>
<noscript><pre>400: Invalid request
</pre></noscript>
<script src="https://gist.github.com/19fb97121ff6f3a0acf64f87bc577112.js"> </script>
</div>
</div>
<div class="post-meta">
<ul>
<li><a href="http://mrc0der.github.io/tag/sqlserver">sqlserver</a></li>
<li><a href="http://mrc0der.github.io/tag/dba">dba</a></li>
</ul>
</div>
<div class="post-time">
<i class="fa fa-calendar"></i>
<time datetime='2017-04-04'>04 Apr 2017</time>
</div>
<div class="blog-index">
<h1 class="entry-title">
<a href="/index-new"></a>
</h1>
<h1 class="entry-title">
<a href="/2017/04/protip-linters-and-more">ProTip - Linters and more</a>
</h1>
<div class="entry-content"><p>Below you will find a list of linters I use as well as other atom plugins.</p>
<h4 id="python">Python</h4>
<ul>
<li>linter-python-pep8</li>
<li>linter-pylint</li>
<li>linter-pycodestyle</li>
</ul>
<h4 id="ruby">Ruby</h4>
<ul>
<li>linter-rubocop</li>
<li>linter-ruby</li>
<li>linter-erb</li>
</ul>
<h4 id="chef">Chef</h4>
<ul>
<li>linter-foodcriic</li>
<li>linter-cookstyle</li>
<li>language-chef</li>
</ul>
<h4 id="terraform">Terraform</h4>
<ul>
<li>linter-terraform-syntax</li>
<li>language-terraform</li>
</ul>
<h4 id="atom-plugins">Atom Plugins</h4>
<noscript><pre>400: Invalid request
</pre></noscript>
<script src="https://gist.github.com/d048bd8d4a1de7792dbba00fcc2b3b54.js"> </script>
</div>
</div>
<div class="post-meta">
<ul>
<li><a href="http://mrc0der.github.io/tag/protip">protip</a></li>
<li><a href="http://mrc0der.github.io/tag/atom">atom</a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-4 hidden-xs">
<div class="sidebar ">
<h2>Recent Posts</h2>
<ul>
<li><a href="/2017/06/chef-cookbook-dependencies">Chef Cookbook Dependencies</a></li>
<li><a href="/2017/04/aws-rds-mysql-ssl-connection">AWS RDS MySQL SSL Connection</a></li>
<li><a href="/2017/04/protip-sql-server-snippets">ProTip - SQL Server Snippets</a></li>
<li><a href="/2017/04/sql-server-drop-and-recreate-fks-pragmatically">SQL Server - Drop and Recreate FKs Pragmatically</a></li>
<li><a href="/2017/04/protip-linters-and-more">ProTip - Linters and more</a></li>
</ul>
</div>
<div class="sidebar">
<h2>Tags</h2>
<ul class="sideBarTags">
<li>
<a href="/tag/atom" data-toggle="tooltip" data-placement="right" title="1">
<span>atom</span></a></li>
<li>
<a href="/tag/aws" data-toggle="tooltip" data-placement="right" title="2">
<span>aws</span></a></li>
<li>
<a href="/tag/berkshelf" data-toggle="tooltip" data-placement="right" title="1">
<span>berkshelf</span></a></li>
<li>
<a href="/tag/bro" data-toggle="tooltip" data-placement="right" title="1">
<span>bro</span></a></li>
<li>
<a href="/tag/chef" data-toggle="tooltip" data-placement="right" title="3">
<span>chef</span></a></li>
<li>
<a href="/tag/cli" data-toggle="tooltip" data-placement="right" title="1">
<span>cli</span></a></li>
<li>
<a href="/tag/cloudformation" data-toggle="tooltip" data-placement="right" title="1">
<span>cloudformation</span></a></li>
<li>
<a href="/tag/dba" data-toggle="tooltip" data-placement="right" title="1">
<span>dba</span></a></li>
<li>
<a href="/tag/elasticsearch" data-toggle="tooltip" data-placement="right" title="1">
<span>elasticsearch</span></a></li>
<li>
<a href="/tag/git" data-toggle="tooltip" data-placement="right" title="2">
<span>git</span></a></li>
<li>
<a href="/tag/github" data-toggle="tooltip" data-placement="right" title="1">
<span>github</span></a></li>
<li>
<a href="/tag/graphing" data-toggle="tooltip" data-placement="right" title="1">
<span>graphing</span></a></li>
<li>
<a href="/tag/how-to" data-toggle="tooltip" data-placement="right" title="2">
<span>how-to</span></a></li>
<li>
<a href="/tag/ids" data-toggle="tooltip" data-placement="right" title="2">
<span>ids</span></a></li>
<li>
<a href="/tag/jekyll" data-toggle="tooltip" data-placement="right" title="1">
<span>jekyll</span></a></li>
<li>
<a href="/tag/monitoring" data-toggle="tooltip" data-placement="right" title="1">
<span>monitoring</span></a></li>
<li>
<a href="/tag/mysql" data-toggle="tooltip" data-placement="right" title="1">
<span>mysql</span></a></li>
<li>
<a href="/tag/nant" data-toggle="tooltip" data-placement="right" title="1">
<span>nant</span></a></li>
<li>
<a href="/tag/newrelic" data-toggle="tooltip" data-placement="right" title="1">
<span>newrelic</span></a></li>
<li>
<a href="/tag/protip" data-toggle="tooltip" data-placement="right" title="6">
<span>protip</span></a></li>
<li>
<a href="/tag/python" data-toggle="tooltip" data-placement="right" title="1">
<span>python</span></a></li>
<li>
<a href="/tag/rds" data-toggle="tooltip" data-placement="right" title="1">
<span>rds</span></a></li>
<li>
<a href="/tag/security" data-toggle="tooltip" data-placement="right" title="2">
<span>security</span></a></li>
<li>
<a href="/tag/snort" data-toggle="tooltip" data-placement="right" title="1">
<span>snort</span></a></li>
<li>
<a href="/tag/sqlserver" data-toggle="tooltip" data-placement="right" title="2">
<span>sqlserver</span></a></li>
<li>
<a href="/tag/tools" data-toggle="tooltip" data-placement="right" title="2">
<span>tools</span></a></li>
<li>
<a href="/tag/troubleshooting" data-toggle="tooltip" data-placement="right" title="2">
<span>troubleshooting</span></a></li>
<li>
<a href="/tag/ubuntu16.04" data-toggle="tooltip" data-placement="right" title="1">
<span>ubuntu16.04</span></a></li>
<li>
<a href="/tag/update" data-toggle="tooltip" data-placement="right" title="1">
<span>update</span></a></li>
<li>
<a href="/tag/windows" data-toggle="tooltip" data-placement="right" title="1">
<span>windows</span></a></li>
<li>
<a href="/tag/wordpress" data-toggle="tooltip" data-placement="right" title="2">
<span>wordpress</span></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<footer class="footer-distributed">
<div class="container">
<div class="footer">
<p>Zer0day.net © 2017</p>
<h6>Follow me</h6>
<ul class="social-media">
<li>
<a title="mrc0der on Github" href="https://github.com/mrc0der" target="_blank"><i class="fa fa-github fa-2x"></i></a>
</li>
<li>
<a title="jonpricelinux on LinkedIn" href="https://www.linkedin.com/in/jonpricelinux" target="_blank"><i class="fa fa-linkedin fa-2x"></i></a>
</li>
<li>
<a title="feed.xml RSS" href="/feed.xml" target="_blank"><i class="fa fa-rss fa-2x"></i></a>
</li>
</ul>
</div>
</div>
</footer>
</div>
</body>
</html>