summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2018-11-03 18:12:30 -0600
committerAaron Ball <nullspoon@oper.io>2018-11-03 18:23:58 -0600
commitadd42514d3bf1a15d9f70df95d0fb46d4c2d5859 (patch)
treeabea517617fea7e1079903c2b9ac632961480281
parent5ec427f35035e50294c6383c228e4f4019086d43 (diff)
downloadoper.io-add42514d3bf1a15d9f70df95d0fb46d4c2d5859.tar.gz
oper.io-add42514d3bf1a15d9f70df95d0fb46d4c2d5859.tar.xz
Fixed a few post header issues
-rw-r--r--posts/Apache:Listening_Port.adoc39
-rw-r--r--posts/Benchmarks:Toshiba_Canvio_Slim.adoc35
-rw-r--r--posts/Cell_Provider_Comparison.adoc7
-rw-r--r--posts/Cool,_Fun,_and_Mostly_Useless_Things_to_do_with_Linux.adoc16
-rw-r--r--posts/Divs_That_Move_When_Users_Scroll.adoc46
-rw-r--r--posts/Git_Basics.adoc13
-rw-r--r--posts/Linux:Checking_CPU_Core_Usage.adoc29
-rw-r--r--posts/Linux:Using_Bash_to_Generate_a_Wordlist.adoc27
-rw-r--r--posts/MPlayer:Recursively_Play_All_Files.adoc33
-rw-r--r--posts/Mutt:Sorting_Mail_Like_a_Boss.adoc9
-rw-r--r--posts/Puppet:Out_of_Range_for_Type_Integer.adoc13
-rw-r--r--posts/Running_Load_Tests_with_a_Remote_VSTS_Controller_and_Associated_Agents.adoc6
-rw-r--r--posts/Securing_a_Postfix_Smtp_Server.adoc74
-rw-r--r--posts/Vim:Frequently_Used_Bits_and_Doodads.adoc57
-rw-r--r--posts/benchmark:seagate-backup-slim-plus-1tb.adoc13
15 files changed, 158 insertions, 259 deletions
diff --git a/posts/Apache:Listening_Port.adoc b/posts/Apache:Listening_Port.adoc
index fc0ef57..e41d3a8 100644
--- a/posts/Apache:Listening_Port.adoc
+++ b/posts/Apache:Listening_Port.adoc
@@ -4,7 +4,6 @@ Apache:Listening Port
:email: nullspoon@iohq.net
-
I recently had a web server behind a load balancer that needed to listen on a
different port because the load balancer was translating port 80 traffic for
security. Thankfully, changing the ports that HTTPd listens on is relatively
@@ -13,47 +12,37 @@ simple.
Crack open your favorite command line editor. For the purposes of this example,
I'll be using vim.
-----
-vim /etc/httpd/conf/httpd.conf
-----
+ vim /etc/httpd/conf/httpd.conf
This is a relatively large file, so you'll have to scroll for some time
to find what we're looking for. Otherwise, you can use search. Scroll
down until you find a section that looks like
-----
-#
-# Listen: Allows you to bind Apache to specific IP addresses and/or
-# ports, in addition to the default. See also the <VirtualHost>
-# directive.
-#
-# Change this to Listen on specific IP addresses as shown below to
-# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
-#
-# Listen 12.34.56.78:80
-#
-Listen 80
-----
+ #
+ # Listen: Allows you to bind Apache to specific IP addresses and/or
+ # ports, in addition to the default. See also the <VirtualHost>
+ # directive.
+ #
+ # Change this to Listen on specific IP addresses as shown below to
+ # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
+ #
+ # Listen 12.34.56.78:80
+ #
+ Listen 80
Depending on your needs, whatever ports you need, add "Listen <port>" in this
section. If for instance you need httpd to listen for an ssl (https) encrypted
connection, you can add
-----
-Listen 443
-----
+ Listen 443
Once you've made the changes you want, save and close the file and run the
command
-----
-/etc/init.d/httpd restart
-----
+ /etc/init.d/httpd restart
That's all there is to it! Now for lunch.
-Category:Apache
-
// vim: set syntax=asciidoc:
diff --git a/posts/Benchmarks:Toshiba_Canvio_Slim.adoc b/posts/Benchmarks:Toshiba_Canvio_Slim.adoc
index f5b9d54..3e8dc43 100644
--- a/posts/Benchmarks:Toshiba_Canvio_Slim.adoc
+++ b/posts/Benchmarks:Toshiba_Canvio_Slim.adoc
@@ -4,7 +4,6 @@ Benchmarks:Toshiba Canvio Slim
:email: nullspoon@iohq.net
-
If you're considering purchasing an external hard drive, :Category:Benchmarks[
these benchmarks] should hopefully help clear up some questions you might have.
In this post, I benchmark my http://www.toshiba.com/us/canvio-slim[Toshiba
@@ -24,36 +23,30 @@ image:files/Toshiba_Canvio_Slim.png[height=300]
* *Average Read Speed*: 93.5 MB/s
[[benchmarks]]
-=== Benchmarks
+Benchmarks
+----------
[[usb3-devzero-write]]
-==== USB3 /dev/zero Write
+USB3 /dev/zero Write
+~~~~~~~~~~~~~~~~~~~~
Writing 16 gigabytes of zeros.
-----
-dd if=/dev/zero of=/dev/sdc bs=1M count=16384
-16384+0 records in
-16384+0 records out
-17179869184 bytes (17 GB) copied, 173.495 s, 99.0 MB/s
-----
+ dd if=/dev/zero of=/dev/sdc bs=1M count=16384
+ 16384+0 records in
+ 16384+0 records out
+ 17179869184 bytes (17 GB) copied, 173.495 s, 99.0 MB/s
[[usb3-read-to-devnull]]
-==== USB3 Read to /dev/null
+USB3 Read to /dev/null
+~~~~~~~~~~~~~~~~~~~~~~
Reading 16 gigabytes to /dev/null.
-----
-dd if=/dev/sdc of=/dev/null bs=1M count=16384
-16384+0 records in
-16384+0 records out
-17179869184 bytes (17 GB) copied, 183.838 s, 93.5 MB/s
-----
-
-Category:Hard_Drives
-Category:Benchmarks
-Category:Toshiba
+ dd if=/dev/sdc of=/dev/null bs=1M count=16384
+ 16384+0 records in
+ 16384+0 records out
+ 17179869184 bytes (17 GB) copied, 183.838 s, 93.5 MB/s
-// vim: set syntax=asciidoc:
diff --git a/posts/Cell_Provider_Comparison.adoc b/posts/Cell_Provider_Comparison.adoc
index 4d4f954..38e8e92 100644
--- a/posts/Cell_Provider_Comparison.adoc
+++ b/posts/Cell_Provider_Comparison.adoc
@@ -4,7 +4,6 @@ Cell Provider Comparison
:email: nullspoon@iohq.net
-
A few years ago, I was researching cell phone providers, and noticed a distinct
lack of _real_ information for an accurate comparison. It seems that everyone's
monthly rates are comprised of different numbers; they charge up front for the
@@ -17,7 +16,7 @@ of this information in an attempt to gather it all in one useful place.
[[a-few-preliminary-notes]]
A few Preliminary Notes
-~~~~~~~~~~~~~~~~~~~~~~~
+-----------------------
* The information in this spreadsheet _should_ be accurate as of
**2014.12.22**.
@@ -34,10 +33,8 @@ A few Preliminary Notes
[[the-files]]
The Files
-~~~~~~~~~
+---------
* For *OpenOffice/LibreOffice* users: link:files/Cell_comparison.ods[Cell_comparison.ods]
* For *Microsoft Office* users: link:files/Cell_comparison.xlsx[Cell_comparison.xls]
-
-// vim: set syntax=asciidoc:
diff --git a/posts/Cool,_Fun,_and_Mostly_Useless_Things_to_do_with_Linux.adoc b/posts/Cool,_Fun,_and_Mostly_Useless_Things_to_do_with_Linux.adoc
index bfb2bdb..3ff22fb 100644
--- a/posts/Cool,_Fun,_and_Mostly_Useless_Things_to_do_with_Linux.adoc
+++ b/posts/Cool,_Fun,_and_Mostly_Useless_Things_to_do_with_Linux.adoc
@@ -2,7 +2,6 @@ Cool, Fun, and Mostly Useless Things to do with Linux
=====================================================
:author: Aaron Ball
:email: nullspoon@iohq.net
-:revdate: June 1, 2015
I frequently find myself on a weekend without much to do, wishing I could have
@@ -18,7 +17,8 @@ If that describes you, hopefully this post will help.
[[linux-general]]
-=== Linux General
+Linux General
+-------------
Not all of these projects require a "Linux server" or a "Linux desktop".
Most of these are quite doable with either category.
@@ -33,7 +33,8 @@ Most of these are quite doable with either category.
[[linux-as-a-server]]
-=== Linux as a Server
+Linux as a Server
+-----------------
This category we can safely say requires a server with a static ip
address (or at least dynamic dns), and will be running most of the time,
@@ -79,7 +80,9 @@ IPs unless they are explicitely requested).
[[linux-as-a-desktop]]
-=== Linux as a Desktop
+Linux as a Desktop
+------------------
+
* Download all of your email locally using http://offlineimap.org/[offlineimap]
and set up command line mail using http://www.mutt.org/[mutt].
@@ -136,8 +139,5 @@ IPs unless they are explicitely requested).
Hopefully that's enough to get you started. Enjoy!
-
[role="datelastedit"]
-Last edited: {revdate}
-
-// vim: set syntax=asciidoc:
+Last edited: {docdate} {doctime}
diff --git a/posts/Divs_That_Move_When_Users_Scroll.adoc b/posts/Divs_That_Move_When_Users_Scroll.adoc
index a4fe24c..d609b84 100644
--- a/posts/Divs_That_Move_When_Users_Scroll.adoc
+++ b/posts/Divs_That_Move_When_Users_Scroll.adoc
@@ -13,35 +13,30 @@ Wrong
[[with-javascript]]
-=== With Javascript
+With Javascript
+---------------
But alas, I started down the JavaScript path anyways. So I can cut to
the chase a bit sooner, I'll just paste the function I wrote so those of
you out there who want to use Javascript can.
-----
-function setScrollable(ScrollObject) {
-  ScrollObject.style.top=window.pageYOffset+'px';
-  ScrollObject.style.left=window.pageXOffset+'px';
-}
-----
+ function setScrollable(ScrollObject) {
+   ScrollObject.style.top=window.pageYOffset+'px';
+   ScrollObject.style.left=window.pageXOffset+'px';
+ }
To use that function, you need several things. First, you need the onscroll
event in your body tag.
-----
-<body onscroll="setScrollable(document.getElementById('ScrollDiv'));">
-----
+ <body onscroll="setScrollable(document.getElementById('ScrollDiv'));">
Finally, you need one thing set in your styles (perhaps two, depending on if
you're using z-values)...
-----
-div#ScrollDiv {
- position:absolute;
- z-index:100;
-}
-----
+ div#ScrollDiv {
+  position:absolute;
+  z-index:100;
+ }
And presto! You've got yourself a div that moves up, down, left, and right when
your user scrolls.
@@ -57,25 +52,20 @@ you can use CSS to do this.
[[with-css]]
-=== With CSS
+With CSS
+--------
As it turns out, that fancy property we all use to keep our backgrounds
from scrolling on our pages also works with objects. To implemenet this
the CSS way, all you need to do it put in a bit of styling to position
your div (or whatever object you want stationary) and your'e set.
-----
-div#ScrollDiv {
- position:fixed;
-}
-----
+ div#ScrollDiv {
+  position:fixed;
+ }
Sweet mother, that was easy!
-Category:CSS
-Category:HTML
-Category:JavaScript
-
-
-// vim: set syntax=asciidoc:
+[role="datelastedit"]
+Last edited: {docdate} {doctime}
diff --git a/posts/Git_Basics.adoc b/posts/Git_Basics.adoc
index 1b73e7a..48b55a3 100644
--- a/posts/Git_Basics.adoc
+++ b/posts/Git_Basics.adoc
@@ -4,7 +4,6 @@ Git Basics
:email: nullspoon@iohq.net
-
Git can be a very complicated thing. Someone once told me that we mere humans
have a very difficult time with it at first. I myself have had a
tremendous<nowiki>[ly difficult]</nowiki> time learning how to use Git (many
@@ -149,7 +148,7 @@ git remote add origin gitman@someserver.org:repos/CleverProjectName
Now, let's break down what that all means since it seems a tad complicated.
[cols=",,,,,",options="header",]
-|===========================================================================
+|===
|git remote |add |origin |gitman |@someserver.org | :repos/CleverProjectName
|This is the command to work with remote servers in git.
|Tells git we are adding a remote
@@ -157,8 +156,9 @@ Now, let's break down what that all means since it seems a tad complicated.
|The username to log in to the remote server with.
|This is the server where the repo is stored
|This is the path to the actual repository directory. Since it does not start
- with a / it starts in the home directory of gitman (~/).
-|=======================================================================
+ with a / it starts in the home directory of gitman (\~/).
+|===
+
[[fetching-a-remote-repository]]
Fetching a Remote Repository
@@ -212,8 +212,3 @@ effectively. I have a repository that should be several gigabytes with about 60
commits per branch (it's a repo used for versioned backups), and _git gc_
reduced it to about 370 megabytes.
-
-Category:Git
-
-
-// vim: set syntax=asciidoc:
diff --git a/posts/Linux:Checking_CPU_Core_Usage.adoc b/posts/Linux:Checking_CPU_Core_Usage.adoc
index 1f7182d..d16737a 100644
--- a/posts/Linux:Checking_CPU_Core_Usage.adoc
+++ b/posts/Linux:Checking_CPU_Core_Usage.adoc
@@ -4,7 +4,6 @@ Linux:Checking CPU Core Usage
:email: nullspoon@iohq.net
-
This is mostly for my own future reference. Today I needed to to check the
resource consumption of an application on a currently bare metal system so I
could get a good idea how to spec out its new virtual home. Now, in Linux,
@@ -18,37 +17,31 @@ per core usage that didn't involve installing additional packages on the system
[[mpstat]]
mpstat
-~~~~~~
+------
Mpstat is a really cool program I happened upon today in my searches. It
basically reports on every live stat you could ever want on a CPU.
-----
-mpstat -P ALL 2 10
-----
+ mpstat -P ALL 2 10
+
That will report _all_ stats on all cpus every _2_ seconds, _10_ times.
[[top]]
top
-~~~
+---
I'd prefer not using something that's interractive so I can more easily use the
data with other programs (like tr, cut, grep, etc), which is why I included
this one second. With top, if you press the *1* key while it's running, it will
print per-core cpu stats.
-----
-Tasks: 188 total, 1 running, 187 sleeping, 0 stopped, 0 zombie
-Cpu0 : 0.3%us, 0.0%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
-Cpu1 : 0.0%us, 0.0%sy, 0.0%ni, 97.0%id, 3.0%wa, 0.0%hi, 0.0%si, 0.0%st
-Cpu2 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
-Cpu3 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
-Mem: 4086584k total, 3951260k used, 135324k free, 24532k buffers Swap:
-8388600k total, 4203824k used, 4184776k free, 103416k cached
-----
-
-Category:Linux
+ Tasks: 188 total, 1 running, 187 sleeping, 0 stopped, 0 zombie
+ Cpu0 : 0.3%us, 0.0%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
+ Cpu1 : 0.0%us, 0.0%sy, 0.0%ni, 97.0%id, 3.0%wa, 0.0%hi, 0.0%si, 0.0%st
+ Cpu2 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
+ Cpu3 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
+ Mem: 4086584k total, 3951260k used, 135324k free, 24532k buffers Swap:
+ 8388600k total, 4203824k used, 4184776k free, 103416k cached
-// vim: set syntax=asciidoc:
diff --git a/posts/Linux:Using_Bash_to_Generate_a_Wordlist.adoc b/posts/Linux:Using_Bash_to_Generate_a_Wordlist.adoc
index a432e24..f23b7a0 100644
--- a/posts/Linux:Using_Bash_to_Generate_a_Wordlist.adoc
+++ b/posts/Linux:Using_Bash_to_Generate_a_Wordlist.adoc
@@ -4,7 +4,6 @@ Linux:Using Bash to Generate a Wordlist
:email: nullspoon@iohq.net
-
A few weeks ago my wife forgot her KeePass password. She can remember most of
it, but there are certain portions of it she can't quite get (looks like the
muscle memory didn't stick too well). With that, she asked me if there was a
@@ -18,7 +17,7 @@ about _120,744 septillion years_ of crack time at 1000 hashes per second).
[[inline-array-expansion]]
Inline Array Expansion
-~~~~~~~~~~~~~~~~~~~~~~
+----------------------
To do this, we're going to use one of bash's lesser-known functionalities:
*inline array expansion* (I don't know its official name or if it even has one,
@@ -27,9 +26,7 @@ so that's what I'm calling it).
If you've ever looked up how to manually create a maildir directory, you've
likely seen something like this
-----
-mkdir -p ./your_dir/\{cur,new,tmp}
-----
+ mkdir -p ./your_dir/\{cur,new,tmp}
At runtime, bash will expand that command to three seperate commands
@@ -40,13 +37,12 @@ At runtime, bash will expand that command to three seperate commands
Another good example of this functionality would be creating a new home
directory.
-----
-mkdir -p /home/username/\{Desktop,Documents,Downloads,Music,Pictures,Videos}
-----
+ mkdir -p /home/username/\{Desktop,Documents,Downloads,Music,Pictures,Videos}
+
[[generating-the-wordlist]]
Generating the Wordlist
-~~~~~~~~~~~~~~~~~~~~~~~
+-----------------------
Applying this to generating a wordlist is very similar to creating
"arrays" of nested directories in a single command. To generate a
@@ -56,7 +52,7 @@ We'll also use varying combinations of arrays in a single line.
[[example]]
Example
-^^^^^^^
+~~~~~~~
Suppose the password you want to work on is something like __password1234__.
However, what we don't know is the order of the _1234_ at the end. We also
@@ -64,20 +60,13 @@ don't know if the first letter is capitalized or not, or if the actual password
uses 0's in lieu of o's, 4's in lieu of a's, or 5's in lieu of s's. Let's see
what we can do about this.
-----
-echo \{p,P}\{4,a,A}\{5,s,S}w\{0,o,O}rd\{1,2,3,4}\{1,2,3,4}\{1,2,3,4}\{1,2,3,4} > possible_passwords
-----
+ echo \{p,P}\{4,a,A}\{5,s,S}w\{0,o,O}rd\{1,2,3,4}\{1,2,3,4}\{1,2,3,4}\{1,2,3,4} > possible_passwords
That should produce a file containing roughly 13,000 words. However, due
to the way the arrays are processed, newlines are not inserted between each
possible password. To remedy this, just do a quick sed expression (or awk if
you like)
-----
-sed -i 's/ /\n/g' ./possible_passwords
-----
+ sed -i 's/ /\n/g' ./possible_passwords
With that, you now have a wordless primed and ready for use with john.
-
-
-// vim: set syntax=asciidoc:
diff --git a/posts/MPlayer:Recursively_Play_All_Files.adoc b/posts/MPlayer:Recursively_Play_All_Files.adoc
index f46f744..c809c51 100644
--- a/posts/MPlayer:Recursively_Play_All_Files.adoc
+++ b/posts/MPlayer:Recursively_Play_All_Files.adoc
@@ -1,10 +1,9 @@
MPlayer:Recursively Play All Files
-===========
+==================================
:author: Aaron Ball
:email: nullspoon@iohq.net
-
I've researched this one before and there doesn't seem to be a real standard
for how to do this (such as a -r switch for recursive play). Granted, when in
Linux is there a standard for something that doesn't really need to be
@@ -18,57 +17,45 @@ involves a little http://tldp.org/LDP/abs/html/process-sub.html[process
substitution] (ksh, sh, and csh users, sorry. Those shells don't support
process substitution).
-----
-mplayer -playlist <(find /path/to/music -type f -name \*.ogg)
-----
+ mplayer -playlist <(find /path/to/music -type f -name \*.ogg)
[[what-just-happened]]
-== What just happened?!
+What just happened?!
+--------------------
What we just did there was perform process redirection. When you run the
**find /mnt/music -type...**, a process is started up. What the *<()*
around the command does is create a link to the output of the pid at
/dev/fd/63. A quick _ls -l_ will show us this.
-----
-[nullspoon@null music]$ ls -l <(find /path/to/music/ -name \*.ogg)
-lr-x------ 1 nullspoon nullspoon 64 Jun 14 10:00 /dev/fd/63 -> pipe:[59723]
-----
+ [nullspoon@null music]$ ls -l <(find /path/to/music/ -name \*.ogg)
+ lr-x------ 1 nullspoon nullspoon 64 Jun 14 10:00 /dev/fd/63 -> pipe:[59723]
If you want to see the contents of that file, you can simply just run the find
command without anything else. If you want to see it in vim like you're editing
it, replace _mplayer -playlist_ with __vim__. This will be like running +vim
/dev/fd/63+.
-----
-vim <(find /path/to/music -type f -name \*.ogg)
-----
+ vim <(find /path/to/music -type f -name \*.ogg)
Now, if you realy wanted to get crazy, you could change append to the
find command a bit to listen only to music with names that have a 7 in
them.
-----
-mplayer -playlist <(find /path/to/music/ -name \*.ogg | grep 7)
-----
+ mplayer -playlist <(find /path/to/music/ -name \*.ogg | grep 7)
... Or sort our music backwards?
-----
-mplayer -playlist <(find /path/to/music/ -name \*.ogg | sort -r)
-----
+ mplayer -playlist <(find /path/to/music/ -name \*.ogg | sort -r)
... Or a random sort?!
-----
-mplayer -playlist <(find /path/to/music/ -name \*.ogg | sort -R)
-----
+ mplayer -playlist <(find /path/to/music/ -name \*.ogg | sort -R)
The last one is kind of pointless since mplayer has a *-shuffle* switch. I
guess you could combine the two and get _doubly_ shuffled music! I think Chef
Elzar would have something to say about that. "BAM!!!"
-Category:Linux
// vim: set syntax=asciidoc:
diff --git a/posts/Mutt:Sorting_Mail_Like_a_Boss.adoc b/posts/Mutt:Sorting_Mail_Like_a_Boss.adoc
index 1208bb6..48608aa 100644
--- a/posts/Mutt:Sorting_Mail_Like_a_Boss.adoc
+++ b/posts/Mutt:Sorting_Mail_Like_a_Boss.adoc
@@ -4,7 +4,6 @@ Mutt:Sorting Mail Like a Boss
:email: nullspoon@iohq.net
-
Mutt is a relatively difficult mail client to learn. However, as most if not
all mutt users will tell you, once you've got the hang of it, no other mail
client can come close to matching the efficiency and speed of command line mail
@@ -18,7 +17,8 @@ quickly. Here's what I use nearly every day.
[[tags]]
-=== Tags
+Tags
+----
Mutt supports this neat thing called tagging. It's basically the command line
equivelant of multiselect (ctrl+click or shift+click).
@@ -36,7 +36,8 @@ For instance, do delete all tagged messages, type __;d__.
[[limit-filter]]
-=== Limit (Filter)
+Limit (Filter)
+--------------
In mutt, you can do this really cool (though not novel in the slightest) thing
wherein you filter the displayed messages by a regular expression. You don't
@@ -54,7 +55,5 @@ want to search the body of your emails, preceed your search term with __~B__,
and mutt will go the extra mile and search email bodies for you.
-Category:Linux
-
// vim: set syntax=asciidoc:
diff --git a/posts/Puppet:Out_of_Range_for_Type_Integer.adoc b/posts/Puppet:Out_of_Range_for_Type_Integer.adoc
index f629b11..053fff6 100644
--- a/posts/Puppet:Out_of_Range_for_Type_Integer.adoc
+++ b/posts/Puppet:Out_of_Range_for_Type_Integer.adoc
@@ -24,7 +24,8 @@ ActiveRecord::StatementInvalid: PG::Error: ERROR: value "2147716814" is out of r
[[solution]]
-=== Solution
+Solution
+--------
It turns out that the functionality that uses this is deprecated as of early
2014, so this supposedly isn't an issue with newer puppet installs. However, if
@@ -55,7 +56,8 @@ is 8 bytes, which is a 64 bit number. That means the largest it can hold is
[[executing-the-fix]]
-== Executing the Fix
+Executing the Fix
+-----------------
Before performing the fix, we should probably perform a backup of the database,
unless you're the type who likes causing a fire you have to put out on a
@@ -97,7 +99,8 @@ working now.
[[related-documentation]]
-== Related Documentation
+Related Documentation
+---------------------
This is a bug that was reported about three years ago. They have since migrated
ticket tracking systems, so the links can be found at...
@@ -106,10 +109,6 @@ ticket tracking systems, so the links can be found at...
* (new ticket system) https://tickets.puppetlabs.com/browse/PUP-1173
-Category:Linux
-Category:Automation
-Category:Puppet
-Category:Postgres
// vim: set syntax=asciidoc:
diff --git a/posts/Running_Load_Tests_with_a_Remote_VSTS_Controller_and_Associated_Agents.adoc b/posts/Running_Load_Tests_with_a_Remote_VSTS_Controller_and_Associated_Agents.adoc
index 3f5b57a..d453401 100644
--- a/posts/Running_Load_Tests_with_a_Remote_VSTS_Controller_and_Associated_Agents.adoc
+++ b/posts/Running_Load_Tests_with_a_Remote_VSTS_Controller_and_Associated_Agents.adoc
@@ -4,7 +4,6 @@ Running Load Tests with a Remote VSTS Controller and Associated Agent
:email: nullspoon@iohq.net
-
Running a multi-agent load test isn't too complicated, compliments of Visual
Studio Team Suite. Assuming you have a controller/agent environment set up,
running the actual test requires a bit of modification to the test project so
@@ -13,7 +12,7 @@ remote machine (the controller and its agents). To set this up...
[[load-in-your-test-project]]
Load in your test project
-~~~~~~~~~~~~~~~~~~~~~~~~~
+-------------------------
image:files/01_Open_Test.jpg[height=300]
@@ -43,8 +42,5 @@ reference to the remote controller and that it controlled X many agents.
Happy Testing!
-Category:Microsoft
-Category:Visual_Studio
-
// vim: set syntax=asciidoc:
diff --git a/posts/Securing_a_Postfix_Smtp_Server.adoc b/posts/Securing_a_Postfix_Smtp_Server.adoc
index ad7fb89..ec594e6 100644
--- a/posts/Securing_a_Postfix_Smtp_Server.adoc
+++ b/posts/Securing_a_Postfix_Smtp_Server.adoc
@@ -4,7 +4,6 @@ Securing a Postfix Smtp Server
:email: nullspoon@iohq.net
-
I must start this post with the acknowledgement that I know only what I've
experienced on this topic.
@@ -25,18 +24,16 @@ fixed it.
[[leaving-an-open-relay]]
Leaving an Open Relay
-~~~~~~~~~~~~~~~~~~~~~
+---------------------
An open relay is basically an smtp server that requires no authentication
and/or allows connections from outside ip addresses, so anyone can send emails
from anywhere to anywhere. The settings in question specific to this issue in
my configuration were the following:
-----
-smtpd_recipient_restrictions = permit_mynetworks, check_relay_domains
-...
-mynetworks = 0.0.0.0/0 127.0.0.0/8 [::fff:127.0.0.0]/104 [::1]/128
-----
+ smtpd_recipient_restrictions = permit_mynetworks, check_relay_domains
+ ...
+ mynetworks = 0.0.0.0/0 127.0.0.0/8 [::fff:127.0.0.0]/104 [::1]/128
Basically that is an open relay. Here's why.
@@ -52,7 +49,7 @@ Basically that is an open relay. Here's why.
[[specifying-incorrect-configuration-parameters]]
Specifying Incorrect Configuration Parameters
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---------------------------------------------
One of my first mistakes when configuring Postfix was misspelling some smtpd
parameters using smtp_ instead of smtpd_ to prefix them. As it turns out, if
@@ -65,7 +62,7 @@ specifications of my config file.
[[not-specifying-a-correct-smtpd_sasl_path]]
Not Specifying a Correct smtpd_sasl_path
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+----------------------------------------
This one took me a while. The *smtpd_sasl_path* is a path to the socket file
for your SASL server. In my case, this is Dovecot.
@@ -73,18 +70,14 @@ for your SASL server. In my case, this is Dovecot.
As it turns out, Postfix defaults to running in chroot mode which makes its
root directory /var/spool/postfix/. This was my first mistake. I was specifying
-----
-smtpd_sasl_path = /var/spool/postfix/private/auth-client
-----
+ smtpd_sasl_path = /var/spool/postfix/private/auth-client
and it was not starting up because it couldn't find the socket file. This was
because it was looking for the file at
/var/spool/postfix/var/spool/postfix/private/auth-client a path which clearly
does not exist. The solution to this is to simply specify a relative path.
-----
-smtpd_sasl_path = private/auth-client
-----
+ smtpd_sasl_path = private/auth-client
I decided that I would get smart though and shave off some text from the field
value by configuring Dovecot to place the socket file at
@@ -92,9 +85,7 @@ value by configuring Dovecot to place the socket file at
/var/spool/postfix/private/auth-client (speaking in absolute terms despite
running in chroot mode). This returned the following error
-----
-warning: when SASL type is "dovecot", SASL path "auth-client" should be a socket pathname
-----
+ warning: when SASL type is "dovecot", SASL path "auth-client" should be a socket pathname
As it turns out, postfix won't operate with the SASL socket file path outside
of the private directory. So with that, I placed my auth-client file back in
@@ -103,7 +94,7 @@ the private directory and Postfix started up fine.
[[not-specifying-the-allowed-senders-file]]
Not Specifying the Allowed Senders File
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---------------------------------------
Even if you do have authentication required, you still need to specify which
users can send email with what addresses. This was a bit of a surprise to me
@@ -120,23 +111,17 @@ setup documentation).
Okay. Let's create the map file. To do this, open up and edit
/etc/postfix/controlled_envelope_senders (this file likely doesn't exist yet)
-----
-vim /etc/postfix/controlled_envelope_senders
-----
+ vim /etc/postfix/controlled_envelope_senders
Once you've got that open, you simply need to put the maps in there.
-----
-# envelope sender owners jcricket@example0.com jimminey
-----
+ # envelope sender owners jcricket@example0.com jimminey
Now that we've done that, we need to turn it into a binary. Run the following
command and it will generate a <filename>.db binary map file in the same
directory as the original file.
-----
-postmap /etc/postfix/controlled_envelope_senders
-----
+ postmap /etc/postfix/controlled_envelope_senders
Presto! Now the user jimminey can send email as jcricket@example0.com. However,
so can everyone else...still.
@@ -146,15 +131,13 @@ in our postfix main.cf and set postfix up to restrict access to the maps
specified in that file. Crack er open in your favorite editor and put the
following line in somewhere after *smtpd_sasl_auth_enable*
-----
-smtpd_sasl_auth_enable = yes
-...
-# This line specifies our map file for use by postfix
-# Note that this does NOT reference controlled_envelope_senders.db
-smtpd_sender_login_maps = hash:/etc/postfix/controlled_envelope_senders
-# This line sets postfix to reject anyone who authenticates but tries to send email as an address they aren't permitted to use
-smtpd_recipient_restrictions = reject_sender_login_mismatch, permit_sasl_authenticated, reject_unauth_destination
-----
+ smtpd_sasl_auth_enable = yes
+ ...
+ # This line specifies our map file for use by postfix
+ # Note that this does NOT reference controlled_envelope_senders.db
+ smtpd_sender_login_maps = hash:/etc/postfix/controlled_envelope_senders
+ # This line sets postfix to reject anyone who authenticates but tries to send email as an address they aren't permitted to use
+ smtpd_recipient_restrictions = reject_sender_login_mismatch, permit_sasl_authenticated, reject_unauth_destination
So what we've just done is tell Postfix where our map file is
(smtpd_sender_login_maps). After that, we tell Postfix to reject any users that
@@ -168,7 +151,7 @@ forth exploit attempt that got me.
[[misordering-smtpd_recipient_restrictions]]
Misordering smtpd_recipient_restrictions
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+----------------------------------------
This one is the final bit that let the spammers in (so far at least).
@@ -176,9 +159,7 @@ The smtpd_recipient_restrictions are restrictions that you can place on
the users and their emails based on various things. In my case, I had
the following restrictions string
-----
-smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_sender_login_mismatch, reject_unauth_destination
-----
+ smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_sender_login_mismatch, reject_unauth_destination
Postfix applies these restrictions in the order in which they are specified. As
they put it <blockquote>Restrictions are applied in the order as specified; the
@@ -187,9 +168,7 @@ matches, then the ones that follow don't get applied. This was very
problematic because in my case permit_mynetworks is first. So that I can log
in from my cell phone which has an IP address that changes, I set
-----
-mynetworks = 0.0.0.0/0 127.0.0.0/8 [::fff:127.0.0.0]/104 [::1]/128
-----
+ mynetworks = 0.0.0.0/0 127.0.0.0/8 [::fff:127.0.0.0]/104 [::1]/128
which allows any IP address to connect to my SMTP server. Since Postfix takes
the first match and goes no further and any IP address is in 0.0.0.0/0, anyone
@@ -198,9 +177,7 @@ can send mail through my SMTP server. This = bad.
What you should do is start your restrictions with the the most strict
restrictions followed by the less strict. In my case, that looks like
-----
-smtpd_recipient_restrictions = reject_sender_login_mismatch, permit_sasl_authenticated, reject_unauth_destination
-----
+ smtpd_recipient_restrictions = reject_sender_login_mismatch, permit_sasl_authenticated, reject_unauth_destination
In the event someone tries to send an email, first they must login. If they
don't log in, they are rejected due to reject_sender_login_mismatch (we can't
@@ -218,8 +195,5 @@ requested action.
As chef Elzar says, "Bam!"
-Category:Linux
-Category:Postfix
-
// vim: set syntax=asciidoc:
diff --git a/posts/Vim:Frequently_Used_Bits_and_Doodads.adoc b/posts/Vim:Frequently_Used_Bits_and_Doodads.adoc
index e3e8b43..46105d0 100644
--- a/posts/Vim:Frequently_Used_Bits_and_Doodads.adoc
+++ b/posts/Vim:Frequently_Used_Bits_and_Doodads.adoc
@@ -4,7 +4,6 @@ Vim:Frequently Used Bits and Doodads
:email: nullspoon@iohq.net
-
I have a friend (yes, you Zeke) who is considering changing from a graphical
editor to a CLI editor, namely vim, for his web developement. His primary
hesitation though is the learning curve for vim, and rightfully so. Coming from
@@ -22,7 +21,8 @@ thinking of learning vim.
[[two-modes]]
-== Two Modes
+Two Modes
+---------
Before we start anywhere else, you need to know that there are two modes for
vim: *command mode* and **insert mode**. Since vim is a command line editor, it
@@ -40,27 +40,28 @@ http://search.dilbert.com/comic/Kybard[kybard].
[[frequently-used-features]]
-== Frequently Used Features
+Frequently Used Features
+------------------------
[[find]]
-=== Find
+Find
+~~~~
Finding in vim is actually fairly simple. You just have to remember that it
searches in two directions: forwards and backwards. To search fowards in
thedocument from the present position of the cursor, type the following in
command mode
-----
-/searchterm
------
+ /searchterm
To search backwards in the document from the present position of the cursor,
type the following in command mode <pre>?searchterm</pre>
[[replace]]
-=== Replace
+Replace
+~~~~~~~
This one is pretty complex unfortunately. However, for those of you who like to
weild the power of the gods, find and replace in vim uses
@@ -74,9 +75,7 @@ A basic find and replace would perform a replace on the entire document. For
example, we want to replace the word _foo_ with __bar__. To do this, do the
following (actually type the : at the beginning of the expression):
-----
-:%s/foo/bar/
-----
+ :%s/foo/bar/
That will replace all instances of foo with bar from the beginning to the end
of the document (the % here means the whole file), unless there is more than
@@ -84,13 +83,12 @@ one instance of foo on a particular line. That will only replace the first
instance found on each line. To replace all for real this time, just append the
letter "g" for "global" (at least I think that's what it stands for).
-----
-:%s/foo/bar/g
-----
+ :%s/foo/bar/g
[[code-folding]]
-=== Code Folding
+Code Folding
+~~~~~~~~~~~~
Depending on the distribution of Linux you are using, code folding may or may
not be enabled already. To enable it however, you need to type exactly the
@@ -118,7 +116,8 @@ nested under currently selected).
[[syntax-highlighting]]
-=== Syntax Highlighting
+Syntax Highlighting
+~~~~~~~~~~~~~~~~~~~
Depending on what distro of Linux you use, syntax highlighting may or may not
be enabled for you by default. If it isn't already, there are two ways to turn
@@ -133,7 +132,8 @@ the language is (eg: #!/usr/bin/perl).
[[line-numbers]]
-=== Line Numbers
+Line Numbers
+~~~~~~~~~~~~
I don't typically put this piece into my .vimrc file because I don't always
like to see line numbers, especially when I need to copy and paste code.
@@ -144,18 +144,17 @@ where you left off. To show or hide line numbers respectively, try the
following commands
.Turn on line numbers
-----
-:set nu
-----
+
+ :set nu
.Turn off line numbers
-----
-:set nonu
-----
+
+ :set nonu
[[reading-in-the-output-of-a-command]]
-=== Reading in the Output of a Command
+Reading in the Output of a Command
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is super handy for me very often. When I'm editing a file and I need to
put the the output of a command (typically data that I need) into my document
@@ -167,13 +166,12 @@ can read in output from a command. For this example, we'll use the output of
__ifconfig -a__. Put the cursor where you want the data to go and then in
command mode, type
-----
-:read !ifconfig -a
-----
+ :read !ifconfig -a
[[visual-mode]]
-=== Visual Mode
+Visual Mode
+~~~~~~~~~~~
This one is a real live saver. If any of you have used vi, you likely know the
wonders of this bit of functionality. For those of you who don't know, in old
@@ -193,7 +191,8 @@ To escape visual mode without making changes, just hit the escape key.
[[an-awesome-cheatsheet]]
-=== An Awesome Cheatsheet
+An Awesome Cheatsheet
+~~~~~~~~~~~~~~~~~~~~~
http://tnerual.eriogerg.free.fr/vimqrc.html
diff --git a/posts/benchmark:seagate-backup-slim-plus-1tb.adoc b/posts/benchmark:seagate-backup-slim-plus-1tb.adoc
index 256076b..5246218 100644
--- a/posts/benchmark:seagate-backup-slim-plus-1tb.adoc
+++ b/posts/benchmark:seagate-backup-slim-plus-1tb.adoc
@@ -4,7 +4,6 @@ Benchmark:Seagate Backup Plus Slim 1TB
:email: nullspoon@oper.io
-
Sadly, my HGST Touro drive is giving out. The drive itself is fine, it's the
USB connector that seems to be going bad. To avoid a difficult data recovery
situation, I replaced it early with a Seagate Backup Plug Slim 1TB drive. Let
@@ -12,7 +11,7 @@ the benchmarking begin!
TL;DR
-~~~~~
+-----
The quick summary for those who don't care to read all the metrics, over a USB
3 port, the drive maxed out at 129 MB/s sequential write and 128 MB/s
@@ -31,7 +30,7 @@ Benchmark started at Mon Jan 15 19:27:21 MST 2018
1 KB Block Size
-~~~~~~~~~~~~~~~
+---------------
NOTE: The other block size benchmarks go up to 20 GB of data. Due to the time
consumption of doing that in 1 KB increments, I capped this one at ~80 MB.
@@ -46,7 +45,7 @@ Jan 15 19:27:46: Read 1K 81920 times. 84 MB, 80 MiB read at 8.3 MB/s.
1 MB Block Size
-~~~~~~~~~~~~~~~
+---------------
----
Jan 15 19:27:46: *** Testing 1 MB blocks
@@ -60,7 +59,7 @@ Jan 15 19:35:55: Read 1M 20480 times. 21 GB, 20 GiB read at 127 MB/s.
2 MB Block Size
-~~~~~~~~~~~~~~~
+---------------
----
Jan 15 19:35:55: *** Testing 2 MB blocks
@@ -74,7 +73,7 @@ Jan 15 19:44:03: Read 2M 10240 times. 21 GB, 20 GiB read at 127 MB/s.
4 MB Block Size
-~~~~~~~~~~~~~~~
+---------------
----
Jan 15 19:44:03: *** Testing 4 MB blocks
@@ -88,7 +87,7 @@ Jan 15 19:52:11: Read 4M 5120 times. 21 GB, 20 GiB read at 127 MB/s.
1 GB Block Size
-~~~~~~~~~~~~~~~
+---------------
----
Jan 15 19:52:11: *** Testing 1 GB blocks

Generated by cgit