<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Joy of Stick</title>
	<atom:link href="https://thejoyofstick.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://thejoyofstick.com/blog</link>
	<description>It&#039;s not a problem to solve, just an issue to enlighten</description>
	<lastBuildDate>Fri, 17 Feb 2023 13:52:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=Biafrongo&amp;popout=1&amp;url=https%3A%2F%2Fthejoyofstick.com%2Fblog%2F&amp;language=en_US&amp;category=text&amp;title=The+Joy+of+Stick&amp;description=It%26%23039%3Bs+not+a+problem+to+solve%2C+just+an+issue+to+enlighten&amp;tags=blog" type="text/html" />
<site xmlns="com-wordpress:feed-additions:1">182683605</site>	<item>
		<title>IPv6 shortening and compressing address rules</title>
		<link>https://thejoyofstick.com/blog/2023/02/16/ipv6-shortening-and-compressing-address-rules/</link>
					<comments>https://thejoyofstick.com/blog/2023/02/16/ipv6-shortening-and-compressing-address-rules/#respond</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Thu, 16 Feb 2023 11:57:36 +0000</pubDate>
				<category><![CDATA[network]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[rfc]]></category>
		<category><![CDATA[rules]]></category>
		<guid isPermaLink="false">https://thejoyofstick.com/blog/?p=1205</guid>

					<description><![CDATA[An IPv6 address can be very long as it is a 128 bits one. Asking someone verbally to check the connectivity to a given address can be tricky :-) There are however some rules to shorten it and it&#8217;s a&#8230; <a href="https://thejoyofstick.com/blog/2023/02/16/ipv6-shortening-and-compressing-address-rules/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p>An IPv6 address can be very long as it is a 128 bits one. Asking someone verbally to check the connectivity to a given address can be tricky :-)</p>



<p>There are however <a href="https://www.rfc-editor.org/rfc/rfc5952#page-10" target="_blank" rel="noreferrer noopener">some rules</a> to shorten it and it&#8217;s a way to remove zeros.</p>



<p><strong>Rule 1: Suppress leading zeros</strong></p>



<p>Remove all leading zeros, the left side zeros, in every 16 bits field.</p>



<p>For example:</p>



<p><code>2001:0db8:0000:0000:0000:0000:000:0001</code></p>



<p>will be simplified to</p>



<p><code>2001:db8:0:0:0:0:0:1</code></p>



<p>Of course <code>0000</code> becomes <code>0</code>.</p>



<p><strong>Rules 2: The larger sequence of <code>:0:0:</code> can be reduced to <code>::</code></strong></p>



<p>You can compact a sequence of zeros to the symbol <code>::</code>. </p>



<p>Applying the rule to <code>2001:db8:0:0:0:0:0:1 </code>would get us <code>2001:db8::1</code>.</p>



<ul class="wp-block-list">
<li>You can&#8217;t compact just one <code>:0:</code> &#8211; only a sequence.</li>



<li>If there is more than one sequence of <code>:0:</code> you can only compact the large one. If they have the same length compact the first one.</li>
</ul>



<p><code>2001:db8::1:1:1:1:1</code> is not correct. It must be <code>2001:db8:0:1:1:1:1:1</code>.</p>



<p><code>2001:0:0:1:0:0:0:1</code> will become <code>2001:0:0:1::1</code>.</p>



<p><code>2001:db8:0:0:1:0:0:1</code> will become <code>2001:db8::1:0:0:1</code>.</p>



<p>That&#8217;s it.</p>



<p></p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2023/02/16/ipv6-shortening-and-compressing-address-rules/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1205</post-id>	</item>
		<item>
		<title>How to check an SSL certificate expiration date from the linux command line</title>
		<link>https://thejoyofstick.com/blog/2022/04/13/how-to-check-an-ssl-certificate-expiration-date-from-the-command-line/</link>
					<comments>https://thejoyofstick.com/blog/2022/04/13/how-to-check-an-ssl-certificate-expiration-date-from-the-command-line/#respond</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Wed, 13 Apr 2022 00:17:58 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[expire]]></category>
		<category><![CDATA[letsencrypt]]></category>
		<category><![CDATA[ssl]]></category>
		<guid isPermaLink="false">https://thejoyofstick.com/blog/?p=1123</guid>

					<description><![CDATA[Check ssl certificate expire date using curl and perl.  <a href="https://thejoyofstick.com/blog/2022/04/13/how-to-check-an-ssl-certificate-expiration-date-from-the-command-line/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p>Some days ago one of my sites certificate expired. I didn&#8217;t pay attention to the <a href="https://letsencrypt.org/" target="_blank" rel="noreferrer noopener">Let&#8217;s Encrypt</a> periodic warning emails &#8211; I&#8217;m using the <a href="https://letsencrypt.org/docs/challenge-types/#dns-01-challenge" target="_blank" rel="noreferrer noopener">DNS-01 challenge</a>.</p>



<p>I must create a simple script to check how many days are left and install it as a cron job.</p>



<p>After some search I found that <code>curl </code>and <code>date</code> could do it.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; gutter: false; title: ; notranslate">
$ curl https://thejoyofstick.com -vI --stderr - | grep &quot;expire date:&quot; | cut -d: -f 2-
Jun 25 17:26:52 2022 GMT

$ date --date='Jun 25 17:26:52 2022 GMT' '+%s'
1656178012

$ date '+%s'
1649805603

$ echo '(1656178012-1649805603)/86400' | bc
73
</pre></div>


<p>We now have a way to calculate how many days are left. <br>You can build a bash script with these and, after checking for a countdown days threshold, send  yourself a proper alert email.</p>



<p>For myself I&#8217;m using a <a href="https://www.perl.org/" target="_blank" rel="noreferrer noopener">perl</a> script based on this one</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: perl; title: ; notranslate">
#!/usr/bin/env perl

use strictures 2;
use IO::Socket::SSL;
use Net::SSLeay;
use Date::Simple ( 'date', 'today' );

my $site = shift || 'example.com';

my $client = IO::Socket::SSL-&gt;new(&quot;$site:443&quot;)
  or die &quot;error=$!, ssl_error=$SSL_ERROR&quot;;
my $cert = $client-&gt;peer_certificate();
my $time = Net::SSLeay::X509_get_notAfter($cert);
my $asn_t = Net::SSLeay::P_ASN1_TIME_get_isotime($time);
my ($date) = split /T/, $asn_t;
my $diff = date($date) - today;
my $warning_time = 15;

print &quot;Expire date: $date\n&quot;;
print &quot;How many days left: $diff\n&quot;;
print &quot;Warning before $warning_time days\n&quot;;

</pre></div>


<p>Added a personal email module to send a message if <code>$diff</code> is less than <code>$warning_time</code> and then <em>cron</em> with it.<br></p>



<p>Enjoy!</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2022/04/13/how-to-check-an-ssl-certificate-expiration-date-from-the-command-line/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1123</post-id>	</item>
		<item>
		<title>Installing SNMP MIB files in Linux Ubuntu 18.04 LTS, 16.04 LTS, 14.04 TLS and 12.04 LTS</title>
		<link>https://thejoyofstick.com/blog/2019/05/28/installing-snmp-mib-files-in-linux-ubuntu-12-04-lts/</link>
					<comments>https://thejoyofstick.com/blog/2019/05/28/installing-snmp-mib-files-in-linux-ubuntu-12-04-lts/#comments</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Tue, 28 May 2019 00:58:26 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mibs]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://tech.moosaico.com/blog/?p=201</guid>

					<description><![CDATA[Update: still valid for Ubuntu 20.04 LTS and 22.04 LTS !!! Where are the MIB files ? I&#8217;m in the middle of upgrading old servers and I found Ubuntu starting on 12.04 didn&#8217;t install the MIB files. Even if you&#8230; <a href="https://thejoyofstick.com/blog/2019/05/28/installing-snmp-mib-files-in-linux-ubuntu-12-04-lts/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><b>Update:</b> still valid for Ubuntu 20.04 LTS and 22.04 LTS !!!</p>
<h2>Where are the MIB files ?</h2>
<p>I&#8217;m in the middle of upgrading old servers and I found Ubuntu starting on 12.04 didn&#8217;t install the MIB files. Even if you install the SNMP applications. It was really strange to launch <code>tkmib</code> and just see a couple of nodes.</p>
<p>The explanation is simple. Just check the preamble of <code>/etc/snmp/snmp.conf</code></p>
<pre lang="linux">#
# As the snmp packages come without MIB files due to license reasons, loading
# of MIBs is disabled by default. If you added the MIBs you can reenable
# loaging them by commenting out the following line.
mibs :</pre>
<h2>Sure, but how can I install them ?</h2>
<p>Fortunately there is a package to deal with that.</p>
<pre lang="linux">$ sudo apt-get install snmp-mibs-downloader</pre>
<p>It will download the IETF MIB files and install them under the usual <code>/usr/share/mibs/</code></p>
<p>If for any reason you don&#8217;t see it happen force it with</p>
<pre lang="linux"> $ sudo download-mibs</pre>
<p>You can repeat this command later to update any new MIB file.</p>
<h2>Let&#8217;s rock&#8217;n&#8217;roll</h2>
<p>Well, almost. At this time your tools still won&#8217;t work correctly. Just remember the text on <code>/etc/snmp/snmp.conf</code>. You have to comment out the <code>mibs :</code> line! Now everything is by the book. Enjoy!</p>
<style type="text/css">
#sc { font-variant: small-caps; }<br />
</style>
<p><a href="https://thejoyofstick.com/blog/2013/04/28/install-hp-support-software-in-your-ubuntu-server/">Install HP Support Software in your Ubuntu server</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2019/05/28/installing-snmp-mib-files-in-linux-ubuntu-12-04-lts/feed/</wfw:commentRss>
			<slash:comments>19</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">201</post-id>	</item>
		<item>
		<title>Problem updating Chrome: Repository changed its &#8216;Origin&#8217; value from &#8216;Google, Inc.&#8217; to &#8216;Google LLC&#8217;</title>
		<link>https://thejoyofstick.com/blog/2018/11/08/problem-updating-chrome-repository-changed-its-origin-value-from-google-inc-to-google-llc/</link>
					<comments>https://thejoyofstick.com/blog/2018/11/08/problem-updating-chrome-repository-changed-its-origin-value-from-google-inc-to-google-llc/#comments</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Thu, 08 Nov 2018 10:34:20 +0000</pubDate>
				<category><![CDATA[desktop]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://thejoyofstick.com/blog/?p=842</guid>

					<description><![CDATA[If you are using the Google repository to update your Chrome it doesn&#8217;t update anymore with apt-get due to security reasons. Reading package lists... Done E: Repository 'http://dl.google.com/linux/chrome/deb stable Release' changed its 'Origin' value from 'Google, Inc.' to 'Google LLC'&#8230; <a href="https://thejoyofstick.com/blog/2018/11/08/problem-updating-chrome-repository-changed-its-origin-value-from-google-inc-to-google-llc/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you are using the Google repository to update your Chrome it doesn&#8217;t update anymore with <code>apt-get</code> due to security reasons.</p>
<pre lang="linux">
Reading package lists... Done                      
E: Repository 'http://dl.google.com/linux/chrome/deb stable Release' changed its 'Origin' value from 'Google, Inc.' to 'Google LLC'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
</pre>
<p>The solution is fast. Just run</p>
<pre lang="linux">
sudo apt update
</pre>
<p>Note that&#8217;s <code>apt</code> and not <code>apt-get</code>. And just accept the change.</p>
<pre lang="linux">
Do you want to accept these changes and continue updating from this repository? [y/N]
</pre>
<p>Done!</p>
<p>Then just use again <code>sudo apt-get update</code> and <code>sudo apt-get upgrade</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2018/11/08/problem-updating-chrome-repository-changed-its-origin-value-from-google-inc-to-google-llc/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">842</post-id>	</item>
		<item>
		<title>Lookout if you process Cisco IOS-XR configuration files</title>
		<link>https://thejoyofstick.com/blog/2016/11/08/look-out-if-you-process-cisco-ios-xr-configuration-files/</link>
					<comments>https://thejoyofstick.com/blog/2016/11/08/look-out-if-you-process-cisco-ios-xr-configuration-files/#respond</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Tue, 08 Nov 2016 12:04:24 +0000</pubDate>
				<category><![CDATA[network]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[vim]]></category>
		<guid isPermaLink="false">http://thejoyofstick.com/blog/?p=716</guid>

					<description><![CDATA[I lost too much time just doing a simple script: checking for a class-map configuration across several backup configuration files. And it never matched! The problem should be with me or my script as I knew it was all ok&#8230; <a href="https://thejoyofstick.com/blog/2016/11/08/look-out-if-you-process-cisco-ios-xr-configuration-files/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>I lost too much time just doing a simple script: checking for a <code>class-map</code> configuration across several backup configuration files. And it never matched!</p>
<p>The problem should be with me or my script as I knew it was all ok on some of the files.</p>
<p>However after bouncing my head several times I found the issue.</p>
<p><b>Some of the configuration has trailing spaces at the end of the line!</b></p>
<p>At first I thought it was may be a problem with <a href="http://www.shrubbery.net/rancid/" target="_blank">RANCID</a>. But it was not.</p>
<p>To make this visible I just issued something like this at the router prompt</p>
<pre lang="cisco">sh run | b ^class-map match-any CORE-VOICE
</pre>
<p>And <i>copy-pasted</i> some lines to vim that gave me this</p>
<p><img fetchpriority="high" decoding="async" class="alignnone wp-image-717 size-full" src="https://thejoyofstick.com/blog/wp-content/uploads/2016/11/lapa-_594-e1478605866356.png" alt="ios-xr-with-trailing-spaces" width="640" height="383" /></p>
<p>The red squares show that there are spaces at the end of two lines!</p>
<p>It&#8217;s a nice feature to have active on vim. Just add these two lines to your <code>~/.vimrc</code></p>
<pre lang="vim">
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
</pre>
<p>So, next time you have to chew some IOS-XR configurations files don&#8217;t forget to right trim all those lines!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2016/11/08/look-out-if-you-process-cisco-ios-xr-configuration-files/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">716</post-id>	</item>
		<item>
		<title>The Joy of Wrong</title>
		<link>https://thejoyofstick.com/blog/2014/05/11/the-joy-of-wrong/</link>
					<comments>https://thejoyofstick.com/blog/2014/05/11/the-joy-of-wrong/#respond</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Sun, 11 May 2014 22:57:40 +0000</pubDate>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[delivery]]></category>
		<category><![CDATA[optimization]]></category>
		<guid isPermaLink="false">http://thejoyofstick.com/blog/?p=653</guid>

					<description><![CDATA[I&#8217;m writing down this excerpt from &#8220;Poke the Box&#8221; by Seth Godin, as a reminder that we have to start and deliver. Even if it&#8217;s not the ideal solution for our application, program module, system integration, or network design. If&#8230; <a href="https://thejoyofstick.com/blog/2014/05/11/the-joy-of-wrong/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m writing down this excerpt from &#8220;<a title="Poke the Box" href="http://amzn.to/1qtWDRJ" target="_blank">Poke the Box</a>&#8221; by Seth Godin, as a reminder that we have to start and deliver. Even if it&#8217;s not the ideal solution for our application, program module, system integration, or network design. If we don&#8217;t have that initial stuff running we may procrastinate and spend all of our time just on research.</p>
<blockquote><p>In the Pike Place Market in Seattle, you can still find the first Starbucks. There&#8217;s something wrong with it, though. It&#8217;s not quite right, not quite a Starbucks . The logo is different; the layout is different.</p>
<p>&nbsp;</p>
<p>It turns out that the original Starbucks didn&#8217;t sell coffee.</p>
<p>&nbsp;</p>
<p>They sold coffee beans and tea leaves and even herbs. But except for a sip or a taste of coffee brewed from a particular bean (drip, no espresso!), there was no cup of coffee to be had.</p>
<p>&nbsp;</p>
<p>Starbucks was wrong. Jerry Baldwin, one of the founders, made a mistake. He thought the beans were the point, not the coffee. Left to Jerry&#8217;s vision of the future, Starbucks would certainly have failed. It took Howard Schultz, a trip to Italy, and an obsession with espresso to turn Starbucks into Starbucks. And Howard gets a lot of credit for making that happen.</p>
<p>&nbsp;</p>
<p>But what if the &#8220;wrong&#8221; Starbucks had never been built? What if Jerry and his partners had said, &#8220;Well, we&#8217;re not sure if this bean thing is going to work, so let’s do nothing&#8221;? Without Jerry Baldwin and his flawed idea for a coffee bean store, there&#8217;d be no Frappuccino. One led to the other by the usual route, which is never a straight line.</p>
<p>&nbsp;</p>
<p>The original Starship Enterprise was conceived by Matt Jefferies. It looked like a cross between a Frisbee and a can opener. Clearly wrong.</p>
<p>&nbsp;</p>
<p>But Matt had the drive to deliver. He took the wrong start and revised and improved and innovated until the Enterprise we know and love came to be. The hardest part, it seems to me, was the first one, the wrong one.</p>
<p>&nbsp;</p>
<p>Poking doesn’t mean right. In means action.</p>
<p>&nbsp;</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2014/05/11/the-joy-of-wrong/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">653</post-id>	</item>
		<item>
		<title>How to automount a remote share in Mavericks</title>
		<link>https://thejoyofstick.com/blog/2014/03/11/how-to-automount-a-remote-share-in-mavericks/</link>
					<comments>https://thejoyofstick.com/blog/2014/03/11/how-to-automount-a-remote-share-in-mavericks/#comments</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Tue, 11 Mar 2014 10:00:55 +0000</pubDate>
				<category><![CDATA[desktop]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[time machine]]></category>
		<category><![CDATA[wdmycloud]]></category>
		<guid isPermaLink="false">http://thejoyofstick.com/blog/?p=623</guid>

					<description><![CDATA[You want to use Time Machine over a remote share. It is important to permanently mount it when you login to your Mac. As an example let&#8217;s connect to a Western Digital My Cloud that has the default name WDMyCloud.&#8230; <a href="https://thejoyofstick.com/blog/2014/03/11/how-to-automount-a-remote-share-in-mavericks/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>You want to use Time Machine over a remote share. It is important to permanently mount it when you login to your Mac.</p>
<p>As an example let&#8217;s connect to a Western Digital My Cloud that has the default name <code>WDMyCloud</code>.</p>
<h2>How to mount it</h2>
<p>After launching the Finder you may see it at the <code>Shared</code> section</p>
<p><a href="https://thejoyofstick.com/blog/wp-content/uploads/2014/03/Screen-Shot-2014-03-10-at-23.18.24.png"><img decoding="async" src="https://thejoyofstick.com/blog/wp-content/uploads/2014/03/Screen-Shot-2014-03-10-at-23.18.24.png" alt="Shared WDMyCloud" width="128" height="47" class="aligncenter size-full wp-image-624" /></a></p>
<p>and just click it and connect with the share you want.</p>
<p>If it&#8217;s not visible just select from the Finder&#8217;s Menu <code>Go / Connect to Server...</code></p>
<p>At the <code>Server Address:</code> type</p>
<pre>
cifs://wdmycloud.local
</pre>
<p>You may change <code>wdmycloud.local</code> with the IP address of your NAS or remote share. Choose the type of connection and then just choose a share. It will show up like this</p>
<p><a href="https://thejoyofstick.com/blog/wp-content/uploads/2014/03/Screen-Shot-2014-03-10-at-23.22.30.png"><img decoding="async" src="https://thejoyofstick.com/blog/wp-content/uploads/2014/03/Screen-Shot-2014-03-10-at-23.22.30.png" alt="Shared wdmycloud.local" width="176" height="45" class="aligncenter size-full wp-image-625" /></a></p>
<h2>Auto mounting the share</h2>
<p>Select from the top menu <code>Apple / System Preferences...</code> <code>/ Users & Groups / Login Items</code></p>
<p>Click the <code>+</code> button and now select your remote device from the left list under <code>Shared</code>.</p>
<p><a href="https://thejoyofstick.com/blog/wp-content/uploads/2014/03/Screen-Shot-2014-03-10-at-23.16.35.png"><img loading="lazy" decoding="async" src="https://thejoyofstick.com/blog/wp-content/uploads/2014/03/Screen-Shot-2014-03-10-at-23.16.35.png" alt="WDMyCloud Connect As" width="177" height="140" class="aligncenter size-full wp-image-626" /></a></p>
<p>Make the connection and select the share you want.</p>
<p>It&#8217;s done! Now every time you enter your Mac it will try to mount that share immediately.</p>
<h2>A little note&#8230;</h2>
<p>Apple guys like to be funny. See what would show up if you used <code>smb:</code> instead of <code>cifs:</code></p>
<p><a href="https://thejoyofstick.com/blog/wp-content/uploads/2014/03/Screen-Shot-2014-03-10-at-23.39.20.png"><img loading="lazy" decoding="async" src="https://thejoyofstick.com/blog/wp-content/uploads/2014/03/Screen-Shot-2014-03-10-at-23.39.20.png" alt="smb wdmycloud.local Connect As" width="181" height="140" class="aligncenter size-full wp-image-627" /></a> </p>
<p>You may be interested in <a href="https://thejoyofstick.com/blog/2012/12/11/using-an-smb-share-from-mountain-lion-in-linux-2/">Using an SMB share from Mac OS X in Linux</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2014/03/11/how-to-automount-a-remote-share-in-mavericks/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">623</post-id>	</item>
		<item>
		<title>Apache2 rewrite rules are not working</title>
		<link>https://thejoyofstick.com/blog/2014/03/05/apache2-rewrite-rules-are-not-working/</link>
					<comments>https://thejoyofstick.com/blog/2014/03/05/apache2-rewrite-rules-are-not-working/#respond</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Wed, 05 Mar 2014 15:11:42 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<guid isPermaLink="false">http://thejoyofstick.com/blog/?p=614</guid>

					<description><![CDATA[You have just edited your .htaccess on the root of your new site with RewriteRules and it&#8217;s not working. Something like this for a WordPress installation RewriteEngine On RewriteBase /blog/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d&#8230; <a href="https://thejoyofstick.com/blog/2014/03/05/apache2-rewrite-rules-are-not-working/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>You have just edited your <code>.htaccess</code> on the root of your new site with RewriteRules and it&#8217;s not working. Something like this for a WordPress installation</p>
<pre lang="linux">
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
</pre>
<p>There are two reasons for this to happen. The <code>mod_rewrite</code> is not enabled by default and your configuration may not allow the use of <code>.htaccess</code></p>
<h2>Enabling <code>mod_rewrite</code></h2>
<p>As I usually don&#8217;t mess with Apache I often forget it has a command to enable modules. It&#8217;s just like this.</p>
<pre>
sudo a2enmod rewrite
</pre>
<h2>Enabling <code>.htaccess</code> files</h2>
<p>Edit your site configuration file under <code>/etc/apache2/sites-available/</code>. At the <code>Directory</code> entry for your site files you need to allow the reading of directives in <code>.htaccess</code> files.</p>
<p>If you were editing the default site </p>
<pre lang="linux">
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
</pre>
<p>you would have to use <code>AllowOverride FileInfo</code> or even <code>AllowOverride All</code>. It&#8217;s your choice.</p>
<h2>Get it to work</h2>
<p>Finally you have to restart the Apache server to activate the changes</p>
<pre>
sudo service apache2 restart
</pre>
<p>That&#8217;s it!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2014/03/05/apache2-rewrite-rules-are-not-working/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">614</post-id>	</item>
		<item>
		<title>Disabling IPv6 in MacOS X or Linux</title>
		<link>https://thejoyofstick.com/blog/2013/08/30/disabling-ipv6-in-macos-x-or-linux/</link>
					<comments>https://thejoyofstick.com/blog/2013/08/30/disabling-ipv6-in-macos-x-or-linux/#respond</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Thu, 29 Aug 2013 23:04:40 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ipv6]]></category>
		<guid isPermaLink="false">http://tech.moosaico.com/blog/?p=537</guid>

					<description><![CDATA[You may be experiencing slow internet for certain sites if you have a router that doesn&#8217;t work well with IPv6 (Fritz, Hitron) or doesn&#8217;t allow you to change its DNS settings. You are having name resolution time outs. I&#8217;m assuming&#8230; <a href="https://thejoyofstick.com/blog/2013/08/30/disabling-ipv6-in-macos-x-or-linux/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>You may be experiencing slow internet for certain sites if you have a router that doesn&#8217;t work well with IPv6 (Fritz, Hitron) or doesn&#8217;t allow you to change its DNS settings. You are having name resolution time outs.</p>
<p>I&#8217;m assuming you only want IPv4 :-)</p>
<p>The straightforward solution is just to disable IPv6 on your machine.</p>
<h2>How to disable ipv6 in MacOS X</h2>
<p>If you have Leopard or Snow Leopard (10.5 or 10.6) click <code>Apple / System Preferences / Network</code>. Choose <code>Ethernet</code> or <code>Airport</code> and then <code>Advanced / TCP/IP</code>. Choose <code>off</code> on <code>Configure IPv6</code>.</p>
<p>For Lion or Mountain Lion (10.7 or 10.8) first open a Terminal. To know the name of the network interface you want to edit type</p>
<pre>
$ networksetup -listallnetworkservices
</pre>
<p>And then disable IPv6 like this, for example,</p>
<pre>
$ networksetup -setv6off Wi-Fi
</pre>
<p>Want to get back ?</p>
<pre>
$ networksetup -setv6automatic Wi-Fi
</pre>
<h2>How to disable IPv6 in Linux</h2>
<p>Let&#8217;s suppose you were using WiFi</p>
<pre>
$ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:1e:65:f6:84:f4  
          inet addr:192.168.1.9  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:65ff:fef6:84f4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34340 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29814 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:25657649 (25.6 MB)  TX bytes:7569224 (7.5 MB)
</pre>
<p>You can see your interface also is using IPv6.</p>
<pre>
$  sudo sysctl net.ipv6.conf.wlan0.disable_ipv6=1
[sudo] password for biafra: 
net.ipv6.conf.wlan0.disable_ipv6 = 1

$ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:1e:65:f6:84:f4  
          inet addr:192.168.1.9  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34507 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29977 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:25677902 (25.6 MB)  TX bytes:7597685 (7.5 MB)
</pre>
<p>You can disable it between reboots on <code>/etc/sysctl.conf</code> with this line:</p>
<pre>
net.ipv6.conf.wlan0.disable_ipv6 = 1
</pre>
<h2>The network problems continue</h2>
<p>Really ? Then maybe it&#8217;s not an IPv6 issue! :-)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2013/08/30/disabling-ipv6-in-macos-x-or-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">537</post-id>	</item>
		<item>
		<title>Cisco Console via aux Port</title>
		<link>https://thejoyofstick.com/blog/2013/08/15/cisco-console-via-aux-port/</link>
					<comments>https://thejoyofstick.com/blog/2013/08/15/cisco-console-via-aux-port/#respond</comments>
		
		<dc:creator><![CDATA[Biafra]]></dc:creator>
		<pubDate>Thu, 15 Aug 2013 01:14:19 +0000</pubDate>
				<category><![CDATA[device]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[aux]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[console]]></category>
		<guid isPermaLink="false">http://tech.moosaico.com/blog/?p=473</guid>

					<description><![CDATA[You need to use your Cisco through the console, like an enable secret recovery, but you forgot your usb-serial dongle. If you have another Cisco near by with remote access you are safe! Preparation Start connecting a Cisco console cable&#8230; <a href="https://thejoyofstick.com/blog/2013/08/15/cisco-console-via-aux-port/" class="more-link">Continue Reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>You need to use your Cisco through the console, like an enable secret recovery, but you forgot your usb-serial dongle. If you have another Cisco near by with remote access you are safe!</p>
<h2>Preparation</h2>
<p>Start connecting a Cisco console cable (cross over cable) from the console port of the router (<code>routerc</code>) to the auxiliary port of the helpful router (<code>routerh</code>).</p>
<p>After remotely accessing <code>routerh</code> configure it&#8217;s <code>aux</code> line</p>
<pre lang="linux">
routerh#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
routerh(config)#line aux 0
routerh(config-line)# transport input telnet
routerh(config-line)#^Z
routerh#
</pre>
<h2>Using the console</h2>
<p>We need to know the line number of the AUX port and the IP address of this <code>routerh</code></p>
<pre lang="linux">
routerh#sh line
   Tty Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
      0 CTY              -    -      -    -    -      0       0     0/0       -
      1 AUX   9600/9600  -    -      -    -    -     13      21     0/0       -
*     2 VTY              -    -      -    -    5    202       0     0/0       -
      3 VTY              -    -      -    -    5      1       0     0/0       -
      4 VTY              -    -      -    -    5   4358       0     0/0       -
      5 VTY              -    -      -    -    5    125       0     0/0       -
      6 VTY              -    -      -    -    5      1       0     0/0       -

routerh#
</pre>
<p>It shows the aux port is on line 1. Our IP address is 192.168.1.1</p>
<p>To access the console you have to telnet your local IP address at port 2000 plus the line number:</p>
<pre lang="linux">
routerh#telnet 192.168.1.1 2001
Trying 192.168.1.1, 2001 ... Open

routerh line 1 


User Access Verification

Username: biafra
Password: 
[ENTER]

routerc line 1 


User Access Verification

Username: biafra
Password: 

routerc#
</pre>
<p>And you are now using the console of <code>routerc</code>. Please note that you may have no console access restrictions as it&#8217;s shown here because of AAA.</p>
<h2>Suspending and Disconnecting</h2>
<p>You can get back to <code>routerh</code> with <code>ctrl-6 x</code> (or <code>ctrl-shift-6 x</code>).</p>
<pre lang="linux">
routerh#sh users
    Line       User       Host(s)              Idle       Location
   1 aux 0     biafra     idle                 00:00:13 192.168.1.1
*  2 vty 0     biafra     192.168.1.1          00:00:09 10.0.0.10

  Interface    User               Mode         Idle     Peer Address

routerh#
</pre>
<p>Just hitting <code>enter</code> or entering the session number you are connected again to the remote console.</p>
<p>To disconnect just check the aux line with <code>sh users</code> and</p>
<pre lang="linux">
routerh#clear line 1
[confirm]
 [OK]
routerh#
[Resuming connection 1 to 192.168.1.1 ... ]

[Connection to 192.168.1.1 closed by foreign host]
routerh#

routerh#sh users
    Line       User       Host(s)              Idle       Location
*  2 vty 0     biafra     192.168.1.1          00:00:14 10.0.0.10

  Interface    User               Mode         Idle     Peer Address

routerh#
</pre>
<h2>To remember</h2>
<p>Configure the aux port and suspend the console with <code>ctrl-6 x</code>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://thejoyofstick.com/blog/2013/08/15/cisco-console-via-aux-port/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">473</post-id>	</item>
	</channel>
</rss>
