<?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>Tutorials &#8211; Avian Bone Syndrome</title>
	<atom:link href="https://www.avianbonesyndrome.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.avianbonesyndrome.com</link>
	<description>An exercise in futility by Daniele Nicolucci</description>
	<lastBuildDate>Fri, 07 Feb 2020 17:57:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.avianbonesyndrome.com/wp-content/uploads/2015/04/cropped-cover-sito-32x32.jpg</url>
	<title>Tutorials &#8211; Avian Bone Syndrome</title>
	<link>https://www.avianbonesyndrome.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">12285558</site>	<item>
		<title>An easy fix for missing exercise minutes on Apple Watch</title>
		<link>https://www.avianbonesyndrome.com/2020/02/07/an-easy-fix-for-missing-exercise-minutes-on-apple-watch/</link>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Fri, 07 Feb 2020 17:57:29 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[puns]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=1396</guid>

					<description><![CDATA[The Apple Watch is a nice little device, and it&#8217;s known to have motivated even lazy people into taking better care of themselves through the &#8220;gamification&#8221; of exercise. However, it can happen that the Workout app doesn&#8217;t properly track exercise minutes (and, to a lesser extent, burned calories), and while Apple provides an official checklist for improving workout calibration, sometimes the issues persist. TL;DR: If you wear the Watch low on your arm, move it higher. Seriously, that fixed it for me. One very peculiar problem I had myself was that indoor walking workouts were not always being recorded properly: calories mostly worked, but I could walk half an hour and yet only a few minutes would be recorded as exercise, even if I walked fast. (Yes, I do walk around he house when it&#8217;s too cold to do so outside; a book or a friend on the phone are&#8230;]]></description>
										<content:encoded><![CDATA[<p>The Apple Watch is a nice little device, and it&#8217;s known to have motivated even lazy people into taking better care of themselves through the &#8220;gamification&#8221; of exercise.</p>
<p>However, it can happen that the Workout app doesn&#8217;t properly track exercise minutes (and, to a lesser extent, burned calories), and while Apple provides <a href="https://support.apple.com/en-us/HT204516">an official checklist for improving workout calibration</a>, sometimes the issues persist.</p>
<blockquote><p><strong>TL;DR: </strong>If you wear the Watch low on your arm, move it higher. Seriously, that fixed it for me.</p></blockquote>
<p>One very peculiar problem I had myself was that indoor walking workouts were not always being recorded properly: calories mostly worked, but <strong>I could walk half an hour and yet only a few minutes would be recorded as exercise, even if I walked fast</strong>. (Yes, I do walk around he house when it&#8217;s too cold to do so outside; a book or a friend on the phone are great reasons not to sit still!)</p>
<p>The weirdest thing was <strong>outdoor workouts generally worked much better, and rebooting the watch usually fixed the indoor workout problem</strong>&#8230; for a while anyway, which ruled out a hardware problem. Recalibrating fitness data didn&#8217;t seem to help in the long term either. Definitely annoying.</p>
<p>I knew that Apple Watch calculates exercise by applying some sort of &#8220;mathemagics&#8221; (did I actually write that?) to sensor data, especially the heart rate monitor and the accelerometers, so I started going through the heart rate graphs of my indoor walking workouts, and I stumbled upon stuff like this:</p>
<p><a href="https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/IMG_C68AA5433A5D-1.jpeg" target="_blank" rel="noopener noreferrer"><img fetchpriority="high" decoding="async" class="aligncenter wp-image-1397 size-large" src="https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/IMG_C68AA5433A5D-1-473x1024.jpeg" alt="" width="473" height="1024" srcset="https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/IMG_C68AA5433A5D-1-473x1024.jpeg 473w, https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/IMG_C68AA5433A5D-1-139x300.jpeg 139w, https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/IMG_C68AA5433A5D-1-768x1662.jpeg 768w, https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/IMG_C68AA5433A5D-1-710x1536.jpeg 710w, https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/IMG_C68AA5433A5D-1.jpeg 828w" sizes="(max-width: 473px) 100vw, 473px" /></a></p>
<p>Notice how <strong>there are considerable gaps in the heart rate graph</strong>, especially considering the time scale at the bottom. That made me think: I do keep the Watch &#8220;not too tight, not too loose&#8221; as per instructions (and, honestly, as per comfort) so I knew that was not the issue. I also have zero tattoos, and while I do sport a little hair on my arms, I&#8217;m definitely not furry. Yet something was occasionally preventing the Watch from recording my rate, and I was determined to figure out what it was.</p>
<p>In the coming days I started paying attention at the monitor: at a glance it worked just fine, however a pattern started to emerge as I looked more closely. I noticed that whenever I brought the watch up and screen turned on — I have a Series 4 so the screen is not always off — <strong>the heart icon was not solid, but rather just showed an outline</strong>. Only after a second or so did it become solid and started pulsating, while the number itself started updating again. That was consistent with the lack of recording, but why? Was it some kind of bug in the software that put the heart rate monitor into sleep mode when the screen was off? Yet the green lights at the bottom worked just fine. That couldn&#8217;t be it.</p>
<figure id="attachment_1403" aria-describedby="caption-attachment-1403" style="width: 500px" class="wp-caption aligncenter"><img decoding="async" class="wp-image-1403" src="https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/greyedout-768x1024.jpg" alt="" width="500" height="667" srcset="https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/greyedout-768x1024.jpg 768w, https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/greyedout-225x300.jpg 225w, https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/greyedout-1152x1536.jpg 1152w, https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/greyedout-1536x2048.jpg 1536w, https://www.avianbonesyndrome.com/wp-content/uploads/2020/02/greyedout-scaled.jpg 1920w" sizes="(max-width: 500px) 100vw, 500px" /><figcaption id="caption-attachment-1403" class="wp-caption-text">Source: u/nilsej on Reddit.</figcaption></figure>
<p>At this point, I must confess, I was a little disheartened — pun fully intended. A few months ago I had had another issue with the heart rate monitor in my Watch, and in that case it was indeed a nasty software bug: for some reason, it just wouldn&#8217;t update the label in the Workout app. It was perfectly functional in the Heart Rate app, and the graphs were perfect. Just the Workout app, during the workout itself, wouldn&#8217;t let me know how my heart was doing. No amounts of reboots helped and I ultimately had to unpair the Watch and re-pair it again. Thankfully a restore from backup didn&#8217;t carry the bug over, so it was just a matter of wasting some time.</p>
<p>This was different, though. <strong>It worked fine, just not always. And looking at the screen would always fix it.</strong> I felt like Bilbo playing riddles with Sméagol, until it dawned on me: what if I&#8217;m wearing it wrong? Not in terms of <em>how tight</em> the strap was, rather <em>where</em> on my arm the watch was. So I did what a man of science would do: run an experiment.</p>
<p>I normally wear the Watch quite low on my wrist, quite close to the hand. It&#8217;s actually comfortable for me, but I thought it might indeed interfere with the readings, especially if my wrist is bent inwards. So <strong>I moved the Watch a little higher, away from the hand</strong>, and off I went. Lo and behold, <strong>it worked perfectly</strong>, and so far it has kept working perfectly for over a week: I just move it a little higher before starting a walk, and bring it back to where it&#8217;s more comfortable for everyday use later on. Also, it looks like <strong>this simple fix has made the Workout app more sensitive even for other kinds of workouts</strong>: now my full Outdoor Walk Workout is recorded (except when I stop because my dog goes forensics on some blades of grass), whereas <strong>before it would often only records the minutes I spent walking uphill</strong>, burning more energy. I had assumed it was due to the Watch &#8220;learning&#8221; what was more or less straining for me, but it turns out it just didn&#8217;t have a good view of my veins.</p>
<p>What is weird about this is that a reboot did seem to temporarily fix the problem. I wouldn&#8217;t be surprised if there was something in the software that sort of adapts to compensate for different readings over time, even though in my case it was actually causing problems. Still, <strong>moving the Watch seems to have fixed it for good</strong>. I noticed that I still get the outline heart occasionally, but that stays on screen for a shorter time and sensor data is recorded just fine; perhaps that&#8217;s just a way for watchOS to avoid refreshing the display framebuffer until it&#8217;s actually needed to be shown on screen, though it also seems to happen with the always-on Series 5.</p>
<p>Does anyone want to, ahem, chime in?</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1396</post-id>	</item>
		<item>
		<title>Get rid of those apps in iTunes that you never sync anymore</title>
		<link>https://www.avianbonesyndrome.com/2012/10/30/get-rid-of-those-apps-in-itunes-that-you-never-sync-anymore/</link>
					<comments>https://www.avianbonesyndrome.com/2012/10/30/get-rid-of-those-apps-in-itunes-that-you-never-sync-anymore/#comments</comments>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Tue, 30 Oct 2012 10:17:38 +0000</pubDate>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[synchronization]]></category>
		<category><![CDATA[syncing]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=708</guid>

					<description><![CDATA[If you&#8217;re like me, you&#8217;ve had an iPhone, iPod Touch and/or iPad for a few years now and have probably amassed a fairly big collection of apps, both free and paid. Until last year&#8217;s iOS 5, this meant having to keep a local copy of each and one of them on the computer you used to sync your iOS device. My &#8220;Mobile Applications&#8221; folder contains 924 items, weighing a whopping 18.78 GB. iTunes only lists 920 apps, so something is out of sync already. Obviously, I do not use that many apps. My iPhone 4 only has 163, and I could delete many of those as I don&#8217;t use them. My father&#8217;s iPad, which uses my Apple ID to get apps so that he doesn&#8217;t have to purchase the same ones I have already paid for, has about 250, most of them being games he tried once or twice and&#8230;]]></description>
										<content:encoded><![CDATA[<p>If you&#8217;re like me, you&#8217;ve had an iPhone, iPod Touch and/or iPad for a few years now and have probably amassed a fairly big collection of apps, both free and paid. Until last year&#8217;s iOS 5, this meant having to keep a local copy of each and one of them on the computer you used to sync your iOS device.</p>
<p>My &#8220;Mobile Applications&#8221; folder contains 924 items, weighing a whopping 18.78 GB. iTunes only lists 920 apps, so something is out of sync already.<br />
Obviously, I do not use that many apps. My iPhone 4 only has 163, and I could delete many of those as I don&#8217;t use them. My father&#8217;s iPad, which uses my Apple ID to get apps so that he doesn&#8217;t have to purchase the same ones I have already paid for, has about 250, most of them being games he tried once or twice and left there.</p>
<p>I&#8217;m about to phase out my glorious 2006 iMac in favor of a new Mac Mini and I&#8217;m going to just move the iTunes Library folder; this way, everything is retained and I don&#8217;t have to convince a brand new iTunes not to nuke the iPhone and iPad just because they have been synced to a different machines. As for the music itself, I could also use iTunes Match to carry it over, but I&#8217;d rather just drop the folder in and be happy about it. The point is that I really don&#8217;t want to waste about 20 GB on the new computer for apps I honestly don&#8217;t care about.</p>
<p>The most immediate method, deleting the apps from iTunes, kind of works&#8230; except that if you delete an app that&#8217;s used on your device, it will be removed from that device upon syncing. The proper way to do this would be to manually delete from iTunes the ones you&#8217;re not using. There&#8217;s a little problem with that: there is absolutely no way of knowing whether any local app is being synced to any device or not, unless you manually check whether every single app is on any of your devices. This sounds dreadful enough with my iPhone, with which I&#8217;m very familiar; doing it with my father&#8217;s iPad sounds like a nightmare.</p>
<p>Thankfully, after a little searching, I found the way to do it in a much easier fashion. Of course, if you follow these instructions and you delete important data or things like that, I&#8217;m not responsible. Do this at your own risk.</p>
<p>I&#8217;m using iTunes 10.7 on OS X 10.7 Lion, but it should be the same on OS X 10.8 Mountain Lion. When iTunes 11 is released in a few days or weeks, it&#8217;s probably going to be much different.</p>
<p>The first, very important thing to do is to <strong>disable automatic syncing</strong>. To do this, open iTunes&#8217;s preferences, go to Devices, and check <em>Prevent iPods, iPhones and iPads from syncing automatically</em>. You can do this even when your device is not connected, but I recommend doing this when it&#8217;s already connected so it&#8217;s even less likely that something goes wrong.<br />
After you&#8217;ve made sure that the new device does not start to sync automatically, go ahead and <strong>run a full backup</strong>, just in case something goes wrong. Find your device in the sidebar, right click on it, and choose <em>Back Up</em>. It will take a while.<br />
After it&#8217;s done backing it up, it&#8217;s time to rock and roll.</p>
<p>Click Apps in the the Library section of the side bar, and either choose <em>Select All</em> from the <em>Edit</em> menu, or hit Command-A on your keyboard. Now all your bazillion apps will be selected. You can either delete them, which I do not recommend, or you can move them to a folder. With all of them selected, just <strong>drag them into a folder you previously created with the Finder</strong> to make a manual backup of all of them. Again, it will take a while. Once all the files are safely copied, you can delete them: just press backspace on your keyboard, or choose <em>Delete</em> from the Edit menu. At this point your may get a scary message warning you that the apps will be deleted from all devices to which they had been copied. Confirm the deletion and move to trash; that&#8217;s why you just copied them out.</p>
<p>Now, here&#8217;s the nice part. <strong>With your device still connected, right click on its name in the sidebar and choose <em>Transfer Purchases</em>.</strong> You may be asked for your Apple ID password, and iTunes will make a local copy of all the apps that are currently on your device.<br />
Rinse and repeat for any other extra device, and you&#8217;re done: at the end you will only have a local copy of the apps that you currently have on your devices.</p>
<p>If you want to be extra sure that everything has been copied correctly, you may want to run <em>Transfer Purchases</em> again for each device. At the end, you can safely re-enable automatic syncing. If you start the syncing procedure immediately, it should not copy (nor delete!) any apps in any direction, meaning they are already synchronized.</p>
<p>At this point, if you want, you can delete the backup folder you had copied your apps to when you began this whole ordeal. I&#8217;d suggest keeping them on a backup disk just in case, but unless the apps are pulled from the App Store, you can safely download them again at no extra cost at any time.</p>
<p>Personally, I ended up recovering about 13 GB by doing this. Not bad, considering that from my point of view those 13 GB were filled with pointless fluff!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.avianbonesyndrome.com/2012/10/30/get-rid-of-those-apps-in-itunes-that-you-never-sync-anymore/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">708</post-id>	</item>
		<item>
		<title>Printing in grayscale with AirPrint</title>
		<link>https://www.avianbonesyndrome.com/2010/11/29/printing-in-grayscale-with-airprint/</link>
					<comments>https://www.avianbonesyndrome.com/2010/11/29/printing-in-grayscale-with-airprint/#comments</comments>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Mon, 29 Nov 2010 14:18:38 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[airprint]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[defaults]]></category>
		<category><![CDATA[grayscale]]></category>
		<category><![CDATA[greyscale]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ios 4.2]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone 4]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=453</guid>

					<description><![CDATA[Did you all think I was dead? Unfortunately for you, I am not. I&#8217;ve just been fairly busy with work and with my renewed interest in photography. Speaking of which, all of you should follow my Flickr photostream, which I update daily. So, you&#8217;ve got the shiny new iOS 4.2 on your iPhone 4 and you have enabled AirPrint sharing on your Mac, using either the free Hacktivator or one of the commercial packages. You are very satisfied (albeit a bit doubtful about actually using it in the future), except for one thing: it prints in color, and you really wish it could print in grayscale, because toner is not cheap. When printing on the Mac this is easy: in any application&#8217;s print dialog, you change the specific settings of your printer to convert to grayscale and save a new preset. Then you just select &#8220;use last selected preset&#8221; and&#8230;]]></description>
										<content:encoded><![CDATA[<p>Did you all think I was dead? Unfortunately for you, I am not. I&#8217;ve just been fairly busy with work and with my renewed interest in photography. Speaking of which, all of you should follow my <a href="http://www.flickr.com/photos/jollino/">Flickr photostream</a>, which I update daily.</p>
<p>So, you&#8217;ve got the shiny new iOS 4.2 on your iPhone 4 and you have enabled AirPrint sharing on your Mac, using either the <a href="http://netputing.com/airprinthacktivator/">free Hacktivator</a> or one of the commercial packages. You are very satisfied (albeit a bit doubtful about actually using it in the future), except for one thing: it prints in color, and you really wish it could print in grayscale, because toner is not cheap.</p>
<p><span id="more-453"></span></p>
<p>When printing on the Mac this is easy: in any application&#8217;s print dialog, you change the specific settings of your printer to convert to grayscale and save a new preset. Then you just select &#8220;use last selected preset&#8221; and you forget about it, limiting yourself to changing it to color whenever you feel like wasting money (or printing money, if you&#8217;re that kind of naughty boy.)</p>
<p>AirPrint, on the other hand, just doesn&#8217;t have any setting, aside from the number of copies. You can&#8217;t even choose which pages to print. It&#8217;s either all or nothing. And it prints in color. It all seems lost, but fear not! OS X&#8217;s print subsystem is based on — or rather, it actually is — CUPS, which stands for Common Unix Printing System. Therefore all you need to is fiddling with it to change the actual default settings. How do you do that? It&#8217;s very, very simple.</p>
<p>Go to <a href="http://localhost:631/">http://localhost:631/</a> (the CUPS configuration runs via a pseudo-webserver on port 631; don&#8217;t worry, this only works on your own machine for your own machine), and click on <em>Administration</em> on top, then click on <em>Manage Printers</em>. Click on the name of the printer in question, and in the <em>Administration</em> pull-down menu choose <em>Set Default Options</em>. What you see now depends on the actual printer you have, but it should very closely resemble the options you get in the OS X print dialog. In my case, the <em>General</em> tab shows a setting called  <em>Color Mode</em> that lets me choose between <em>Color</em> and <em>Grayscale</em>. I set it to the latter, clicked the <em>Set Default Options</em> button, typed in my username and password, and off I went.</p>
<p>Note that you must have administrator rights, and you have use your <strong>short</strong> username, the one in lowercase with no spaces. It&#8217;s the same one that gives the name to your own home folder.</p>
<p>(Many thanks to Marco F. for the input.)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.avianbonesyndrome.com/2010/11/29/printing-in-grayscale-with-airprint/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">453</post-id>	</item>
		<item>
		<title>How to use resizeTo in Safari (if it doesn&#8217;t work)</title>
		<link>https://www.avianbonesyndrome.com/2010/10/05/how-to-use-resizeto-in-safari-if-it-doesnt-work/</link>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Tue, 05 Oct 2010 12:42:35 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[resizeto]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=434</guid>

					<description><![CDATA[Many people are probably familiar with the fact that most browsers allow Javascript code to be entered in the address field. That&#8217;s the magic behind bookmarklets, which simply spare the user the hassle of manually typing long, convoluted and obfuscated Javascript statements. While it&#8217;s usually pointless to do so, there is one case in which it makes perfect sense: resizing the browser window to an arbitrary size, in order to test what a website looks like. Essentially, by setting the browser window to a size such as 1024 x 768, one can have a relatively reliable idea of what the current website would look at that screen resolution. In truth, one would have to take the graphical elements of the operating system in question, but it&#8217;s usually a fine way to get an idea. The code to do so is very simple: window.resizeTo(width, height); Therefore, if we want to set&#8230;]]></description>
										<content:encoded><![CDATA[<p>Many people are probably familiar with the fact that most browsers allow Javascript code to be entered in the address field. That&#8217;s the magic behind <a href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklets</a>, which simply spare the user the hassle of manually typing long, convoluted and obfuscated Javascript statements.</p>
<p>While it&#8217;s usually pointless to do so, there is one case in which it makes perfect sense: resizing the browser window to an arbitrary size, in order to test what a website looks like. Essentially, by setting the browser window to a size such as 1024 x 768, one can have a relatively reliable idea of what the current website would look at that screen resolution. In truth, one would have to take the graphical elements of the operating system in question, but it&#8217;s usually a fine way to get an idea.</p>
<p>The code to do so is very simple:<br />
<code><strong>window.resizeTo</strong>(<em>width</em>, <em>heigh</em>t);</code></p>
<p>Therefore, if we want to set the window to 1024 x 768 pixels, we type the following pseudo-address:<br />
<code>javascript:window.resizeTo(1024, 768);</code></p>
<p>and press enter. A few things worth noting:</p>
<ul>
<li>Capitalization is important. It is resizeTo, with a lowercase &#8220;r&#8221; and a capital &#8220;T&#8221;</li>
<li>There is no space, nor any slash, after the colon</li>
<li>The width and height have to be separated with a comma, and (of course) have to be integers</li>
<li>The semicolon at the end is optional, but if you&#8217;re a programmer it will be natural to type it</li>
<li>In some browsers, you can omit the &#8220;window.&#8221; part, as the current window is implied</li>
</ul>
<p>This is all good and great, and works in most browser.</p>
<p>Safari, however, only allows this intermittently. Since I spent some time making tests to figure it out, here is a tip: Safari will execute <em>resizeTo</em> only when there is one (and only one) tab in the window.</p>
<p>I&#8217;m not sure whether this is caused by a specific setting on my machines, or if it&#8217;s a default, or if it can be even changed, but I can see the point in this behavior. Since some websites have the bad habit of resizing the current window to full screen (an annoying and pointless habit, if you ask me), Safari blocks the execution of such command in order not to disrupt the concurrent navigation of different websites/pages.</p>
<p>It&#8217;s as if it said: &#8220;if this is your own window, do what you want with it; if not, you&#8217;ll have to respect your tab brothers.&#8221;</p>
<p>So, if <em>resizeTo</em> isn&#8217;t working for you, drag that tab out of the bar so it&#8217;s instantly opened in its own window, and try again.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">434</post-id>	</item>
		<item>
		<title>Manual duplex printing on a laser printer</title>
		<link>https://www.avianbonesyndrome.com/2010/09/20/manual-duplex-printing-on-a-laser-printer/</link>
					<comments>https://www.avianbonesyndrome.com/2010/09/20/manual-duplex-printing-on-a-laser-printer/#comments</comments>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Mon, 20 Sep 2010 16:13:14 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[clx-3175]]></category>
		<category><![CDATA[duplex]]></category>
		<category><![CDATA[fronte retro]]></category>
		<category><![CDATA[laser]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[samsung]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=407</guid>

					<description><![CDATA[My laser printer, a Samsung CLX-3175, does not have any tool for automatic duplex printing. Achieving such result manually is not difficult, but may take some trial and error in order to get the settings right. That&#8217;s exactly what I&#8217;ve done, and I&#8217;m writing this post as a note to myself. Should it be useful to anybody else, however, by all means let me know with a comment. Keep in mind that this is for my own printer, and that I use OS X 10.6 &#8220;Snow Leopard.&#8221; Results may vary with different printers and/or operating systems, so make your own tests. If your printer outputs pages &#8220;face down,&#8221; this will probably work as it is. Most ink-jet printers on the other hand output prints &#8220;face up,&#8221; so some adjustments will be necessary. In any case the steps for my own printer are very, very easy (once you&#8217;ve figured them out&#8230;]]></description>
										<content:encoded><![CDATA[<p>My laser printer, a Samsung CLX-3175, does not have any tool for automatic duplex printing. Achieving such result manually is not difficult, but may take some trial and error in order to get the settings right. That&#8217;s exactly what I&#8217;ve done, and I&#8217;m writing this post as a note to myself. Should it be useful to anybody else, however, by all means let me know with a comment.</p>
<p>Keep in mind that this is for my own printer, and that I use OS X 10.6 &#8220;Snow Leopard.&#8221; Results may vary with different printers and/or operating systems, so make your own tests. If your printer outputs pages &#8220;face down,&#8221; this will probably work as it is. Most ink-jet printers on the other hand output prints &#8220;face up,&#8221; so some adjustments will be necessary.</p>
<p>In any case the steps for my own printer are very, very easy (once you&#8217;ve figured them out correctly):</p>
<ol>
<li>Print all odd pages in normal order</li>
<li>If the total number of pages is an odd number, take the last sheet and put it away for the time being</li>
<li>Take the (remaining) sheets and put them back into the tray after rotating them 180°. Do <strong>not</strong> flip them in any way!</li>
<li>Print all even pages in reverse order</li>
<li>If you put the last sheet away in step 2, put it back at the end of the stack</li>
<li>There is no step 6</li>
</ol>
<p>Enjoy. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.avianbonesyndrome.com/2010/09/20/manual-duplex-printing-on-a-laser-printer/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">407</post-id>	</item>
		<item>
		<title>Prettifying URLs with fake subdirectories using mod_rewrite</title>
		<link>https://www.avianbonesyndrome.com/2010/09/16/prettifying-urls-with-fake-subdirectories-using-mod_rewrite/</link>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Thu, 16 Sep 2010 15:59:56 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[deny]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[jbfw]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[query string]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[subdirectories]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wtf]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=391</guid>

					<description><![CDATA[Lately, I have been trying to define a common basis for most of my web projects, since I often end up reinventing the wheel every time. I have tried a few PHP frameworks, but none of them tickled my fancy, but I have complicated tastes. I am known for reimplementing something from scratch rather than wasting time adapting other people&#8217;s code to my needs, and it&#8217;s often much faster too. Therefore I have been working on JBFW, my very own PHP/Javascript framework. One of the key components of it is pretty URLS and a centralized index.php to handle most of the things. If you access http://mysite.com/news?lang=en, the server will transparently route that to http://mysite.com/index.php?pagename=news&#38;lang=en. At that point, index.php runs the news module if it&#8217;s present, and then loads the news template (possibly showing the result of what was done in the module, if it was called at all.) I find that&#8230;]]></description>
										<content:encoded><![CDATA[<p>Lately, I have been trying to define a common basis for most of my web projects, since I often end up reinventing the wheel every time. I have tried a few PHP frameworks, but none of them tickled my fancy, but I have complicated tastes. I am known for reimplementing something from scratch rather than wasting time adapting other people&#8217;s code to my needs, and it&#8217;s often much faster too.</p>
<p>Therefore I have been working on JBFW, my very own PHP/Javascript framework. One of the key components of it is pretty URLS and a centralized index.php to handle most of the things.</p>
<p>If you access <em><strong>http://mysite.com/news?lang=en</strong></em>, the server will transparently route that to <em><strong>http://mysite.com/index.php?pagename=news&amp;lang=en</strong></em>. At that point, index.php runs the <em>news</em> module if it&#8217;s present, and then loads the <em>news</em> template (possibly showing the result of what was done in the module, if it was called at all.) I find that it&#8217;s a very slick and modular way of handling things, as static pages only need new templates and boom, they are live, with the rest of the framework readily accessible.</p>
<p>The <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html">mod_rewrite</a> configuration for such a behavior is as follows:</p>
<p><code>RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteRule ^(.*)$ index.php?pagename=$1&amp;%{QUERY_STRING}</code></p>
<p>This means: if the requested filename is not a directory and is not a file, route the request as described (knowing something about <a href="http://en.wikipedia.org/wiki/Regular_expression">regular expressions</a>, or being proficient in creative swearing — which goes hand in hand with regexp — comes in very handy at this point.)</p>
<p>I used a similar, but coarser, approach on my own main website, <a href="http://www.nicolucci.eu">http://www.nicolucci.eu</a>. There, I even used fake subdirectories, so that <a href="http://www.nicolucci.eu/photography/book/glimpses">http://www.nicolucci.eu/photography/book/glimpses</a> will have it show the <em>photography-book-glimpses</em> template. Neat, but doesn&#8217;t work with real subdirectories. It&#8217;s not a big problem on that site, but when you need to have a separate administration section, you need real subdirectories. The problem is that, using the approach I described above, <em><strong>http://mysite.com/admin/login</strong></em> into <em><strong>http://mysite.com/index.php?pagename=admin/login</strong></em>, and while the correct function could be run in PHP by mangling the request as it&#8217;s done for the &#8220;top level&#8221; modules, it could quickly turn into a nightmare.</p>
<p>The solution is to add another set of mod_rewrite rules, as follows:</p>
<p><code>RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteRule ^((.*)/)+(.*)$ /$2/index.php?pagename=$3&amp;%{QUERY_STRING} [L]</code></p>
<p>Yes, that&#8217;s incredibly messy, and I&#8217;m pretty sure that there is a better way to do it. However it works, and for now I&#8217;m going to concentrate on finishing the website and go back to it later. What this does is: if the request has one or more blocks ending wish a slash (the directory), followed by something else (the file name), it is routed to index.php inside that directory, using the file name as a parameter to <em>pagename</em>, plus the original query string as usual. The <em>[L]</em> at the end tells mod_rewrite: please refrain from doing any other change, this is flaky enough. This ensures that <strong><em>http://mysite.com/admin/login</em></strong> effectively calls <strong><em>http://mysite.com/admin/index.php?pagename=login</em></strong>.</p>
<p>Note that this is another block of RewriteCond and RewriteRule, and goes before the original one. I tried to put them together, since the conditions are the same, but after fifteen minutes of trying all combinations I gave up. I&#8217;m sure I was one attempt away from getting it right.</p>
<p>A very clever thing (ok I&#8217;m kidding, it&#8217;s a side effect I hadn&#8217;t fully realized but I&#8217;m glad it&#8217;s there) is that addresses such as img/logo.png are not rewritten because those files do exist. It would probably make sense to exclude common file extensions, such as image files and javascript, from this kind of mangling; or even better, make it only work when the &#8220;file name&#8221; part does not have a dot in it. I&#8217;ll find a way to do it, at some point.</p>
<p>To finish up, an extra little trick that can come in very handy when you want to make sure that certain files are not downloadable by anybody:</p>
<p><code>&lt;Files ~ "\.sqlite3$"&gt;<br />
Order Allow,Deny<br />
Deny From All<br />
&lt;/Files&gt;</code></p>
<p>Make sure that there are no spaces on either side of the comma in the first line. I was quite frustrated because I kept getting the infamous error 500, and there it was.</p>
<p>I hope this spares someone from wasting as much time as I did with this kind of thing!</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">391</post-id>	</item>
		<item>
		<title>20 tips to run a business without committing suicide</title>
		<link>https://www.avianbonesyndrome.com/2010/09/14/20-tips-to-run-a-business-without-committing-suicide/</link>
					<comments>https://www.avianbonesyndrome.com/2010/09/14/20-tips-to-run-a-business-without-committing-suicide/#comments</comments>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 08:41:40 +0000</pubDate>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[contract]]></category>
		<category><![CDATA[hints]]></category>
		<category><![CDATA[professional]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[work]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=387</guid>

					<description><![CDATA[Starting earlier this year, I have been a &#8220;professional&#8221; IT consultant (libero professionista in Italian.) In practice I mostly deal with web development and computer repairs. It&#8217;s what I&#8217;ve been doing for over a decade now, since I was still in school, only now I get to pay my own taxes (yay) and therefore I get angrier when people try to rip me off. So, here&#8217;s a collection of tips about running a business I put together based on my experience. Note that I refer to the client as a &#8220;he,&#8221; but that&#8217;s just for simplicity. Befriend a lawyer. You will need one sooner or later. Most likely sooner. Assume the client doesn&#8217;t have any clue on the details of your job. Listen to his ideas, make a mental note of how you&#8217;ll approach the problem in practice, and be ready to explain to him why his &#8220;perfect&#8221; solution just&#8230;]]></description>
										<content:encoded><![CDATA[<p>Starting earlier this year, I have been a &#8220;professional&#8221; IT consultant (<em>libero professionista</em> in Italian.)</p>
<p>In practice I mostly deal with web development and computer repairs. It&#8217;s what I&#8217;ve been doing for over a decade now, since I was still in school, only now I get to pay my own taxes (yay) and therefore I get angrier when people try to rip me off. So, here&#8217;s a collection of tips about running a business I put together based on my experience. Note that I refer to the client as a &#8220;he,&#8221; but that&#8217;s just for simplicity.</p>
<ol>
<li>Befriend a lawyer. You <strong>will</strong> need one sooner or later. Most likely sooner.</li>
<li>Assume the client doesn&#8217;t have <strong>any clue</strong> on the details of your job. Listen to his ideas, make a mental note of how you&#8217;ll approach the problem in practice, and be ready to explain to him why his &#8220;perfect&#8221; solution just doesn&#8217;t work and needs to be achieved differently.</li>
<li>Use <strong>lots of metaphors</strong> to explain to the client why you&#8217;re doing what you&#8217;re doing, and why you&#8217;re not doing what he thinks you should be doing. Cars and houses are what people understand the most.</li>
<li>Always require an <strong>advance payment</strong> to start a job and always require the <strong>settlement</strong> to deliver it. This protects the client from an unfinished work, and protects you from an unpaid work: if the client doesn&#8217;t settle, he loses the advance and doesn&#8217;t get the job delivered.</li>
<li>Approved and signed quotes are fine for small jobs, but for anything more complex, a <strong>full written contract</strong> is best. Be shielded from requests that were never discussed in the first place.</li>
<li>Don&#8217;t be afraid of writing long contracts. Rather, make sure you cover everything in clear terms. And use a <strong>big font</strong>. Contracts in small fonts are scary to most people.</li>
<li>Assume all clients are going to try and <strong>rip you off</strong>: give little trust to strangers, trust friends even less, and just avoid relatives altogether.</li>
<li>If a client asks for a discount, especially if it&#8217;s the first time they come to you, deny it and remind them that <strong>discounts are a (rare) privilege, not a right</strong>.</li>
<li>Do not give discounts on the first job upon the promise that a client will come back to you, because they most likely won&#8217;t. Rather, have him pay <strong>full price</strong> on the first job and promise a discount on the next one.</li>
<li>If some problem arises during the execution of the job, let the client know immediately, even if it&#8217;s something trivial. They will appreciate the <strong>openness</strong> and it&#8217;s a good long-term marketing strategy. By the same token, give the client as many details about the work as he needs, but no more. Too much information yields the opposite effect and confuses him.</li>
<li>Do not plan your financial life around prospective clients. Until a quote or a contract is signed, <strong>there is no client</strong>.</li>
<li>Realize that <strong>most clients do not check e-mail regularly</strong> or that they are unable to use it properly. You will be in touch with your clients over the telephone.</li>
<li>Take note of the <strong>timeline</strong> of a job, ie. how long the client takes to do his part (send you materials, issue the payments, etc.) This will let you profile the client so that you can subsequently offer discounts or raise the price accordingly.</li>
<li>Set a base price for the job, and always give a higher quote. Even if the client accepts it as it is, it leaves you room to reduce it and make a <strong>good impression</strong> on him. Again, this is good long-term marketing strategy. Moreover, learning the fine art of haggling allows you to anticipate your client&#8217;s moves and counter them.</li>
<li>If your area has geographical <strong>stereotypes</strong> about work ethics, be prepared to see them reversed.</li>
<li>Round prices so that they are more client-friendly when including tax, but always think <strong>before-tax</strong> for your own planning.</li>
<li>Use <strong>legalese</strong> only when things get rough and you are getting ready to call your lawyer into the game.</li>
<li>If possible, send printed invoices by mail after signing them. This is often pointless, but gives you the chance to add a bunch of <strong>business cards</strong> that your client can give around if they&#8217;re satisfied.</li>
<li>Use a <strong>secondary phone number</strong> for work and give it around whenever you have the chance.  The more people have it, the more potential clients have it. And you can always turn it off if you need a break.</li>
<li>Accept the fact that dealing with clients is like <strong>going to war</strong>. It&#8217;s bloody, messy, time-consuming, frustrating, psychologically impairing and even when you win, you wonder whether it wouldn&#8217;t have been a better idea to buy some land and grow carrots and potatoes instead. And in most cases, it would have been a great idea indeed.</li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://www.avianbonesyndrome.com/2010/09/14/20-tips-to-run-a-business-without-committing-suicide/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">387</post-id>	</item>
		<item>
		<title>Fix broken IMAP attachments in Mail.app</title>
		<link>https://www.avianbonesyndrome.com/2010/09/07/fix-broken-imap-attachments-in-mail-app/</link>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Tue, 07 Sep 2010 09:32:51 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[broken]]></category>
		<category><![CDATA[corrupted]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mail.app]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=369</guid>

					<description><![CDATA[I have recently started getting broken images in Mail.app. Often, when someone sent me relatively big pictures (over 1 MB in size), the image ended up being corrupted, with a smaller file size that one would expect. This results in a picture that&#8217;s visible up to a certain point, and then rest is usually filled with solid grey by the viewer. While this could happen because the attached image is indeed broken — that is, if the sender is attaching an image that&#8217;s already corrupted on his/her machine —, it&#8217;s unlikely that the file gets mangled during the transit. To begin with, the base64 encoding adds lots of CRC (1/3 of the file size, and this alone explains why it&#8217;s a very bad idea to send big files through e-mail). In addition to that, no MTA will accept a malformed message: MIME parts must be completed with an extra boundary&#8230;]]></description>
										<content:encoded><![CDATA[<p>I have recently started getting broken images in Mail.app. Often, when someone sent me relatively big pictures (over 1 MB in size), the image ended up being corrupted, with a smaller file size that one would expect. This results in a picture that&#8217;s visible up to a certain point, and then rest is usually filled with solid grey by the viewer.</p>
<p>While this could happen because the attached image is indeed broken — that is, if the sender is attaching an image that&#8217;s already corrupted on his/her machine —, it&#8217;s unlikely that the file gets mangled during the transit. To begin with, the base64 encoding adds lots of CRC (1/3 of the file size, and this alone explains why it&#8217;s a very bad idea to send big files through e-mail). In addition to that, no MTA will accept a malformed message: MIME parts must be completed with an extra boundary marker, and the infamous dot on its own line has to be there to commit the DATA part. Using a webmail system makes it even more difficult to corrupt a file in transit, because there is the extra uploading step that ensures that the attachment reaches the server <em>before</em> the message is constructed and finally sent.</p>
<p>If none of this makes sense and you want to know more, please refer to <a href="http://tools.ietf.org/html/rfc2821">RFC 2821</a>, but the point is that it&#8217;s virtually impossible for several people to send corrupted images. It&#8217;s way more likely that the problem lies within the recipient&#8217;s client.</p>
<p>With OS X&#8217;s Mail.app, these problems happen when there is some communication failure during the download of the message. Essentially, if the download gets interrupted for any reason, Mail.app may be unable to notice and will be perfectly happy with the broken file. There are two ways to fix this:</p>
<ul>
<li>The hard way: go to ~/Library/Mail, and for each INBOX you may have, delete anything inside the Attachment folder</li>
<li>The easy way: select your Inbox folder within Mail.app and simply run Mailbox → Rebuild</li>
</ul>
<p>That should take care of the problem. Note that the Rebuild procedure will redownload every message from the server again with all the attachments, essentially resynchronizeing the local cache with whatever is on the server, fixing any discrepancies. It may take some time, but you can keep an eye on the progress by opening the Activity window (Window → Activity, or ⌘0.)</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">369</post-id>	</item>
		<item>
		<title>Chords for &#8220;Soft Kitty,&#8221; from The Big Bang Theory</title>
		<link>https://www.avianbonesyndrome.com/2010/09/05/chords-for-soft-kitty-from-the-big-bang-theory/</link>
					<comments>https://www.avianbonesyndrome.com/2010/09/05/chords-for-soft-kitty-from-the-big-bang-theory/#comments</comments>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Sat, 04 Sep 2010 23:17:20 +0000</pubDate>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[TV]]></category>
		<category><![CDATA[guitar]]></category>
		<category><![CDATA[happy kitty]]></category>
		<category><![CDATA[harpsichord]]></category>
		<category><![CDATA[little ball of fur]]></category>
		<category><![CDATA[penny]]></category>
		<category><![CDATA[piano]]></category>
		<category><![CDATA[purr purr purr]]></category>
		<category><![CDATA[sheldon cooper]]></category>
		<category><![CDATA[sleepy kitty]]></category>
		<category><![CDATA[soft kitty]]></category>
		<category><![CDATA[the big bang theory]]></category>
		<category><![CDATA[theremin]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[tv]]></category>
		<category><![CDATA[ukulele]]></category>
		<category><![CDATA[violin]]></category>
		<category><![CDATA[warm kitty]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=364</guid>

					<description><![CDATA[One of the funniest &#8220;inside jokes&#8221; of The Big Bang Theory is the song that Sheldon&#8217;s mom used to sing to him when he was sick. It&#8217;s featured in three episodes, as you can see here: httpvh://www.youtube.com/watch?v=lqSmzGj_sQc The song is, like most lullabies, very simple. I came up with the chords earlier today, while jamming with my ukulele. Here they are, for all my musically-inclined nerdy readers. Corrections are welcome. [G] Soft kitty, [C] warm kitty, [G] little ball of [D] fur; [G] happy kitty, [C] sleepy kitty, [G] purr, [D] purr, [G] purr. Interesting trivia: they are almost the same chords as The Lion Sleeps Tonight, except for a minor difference in the last verse that shouldn&#8217;t prevent the most creative among you to fit one into the other. Should you prefer so, you could play it as C F C G / C F C G C or&#8230;]]></description>
										<content:encoded><![CDATA[<p>One of the funniest &#8220;inside jokes&#8221; of <a href="http://en.wikipedia.org/wiki/The_Big_Bang_Theory">The Big Bang Theory</a> is the song that Sheldon&#8217;s mom used to sing to him when he was sick. It&#8217;s featured in three episodes, as you can see here:</p>
<p>httpvh://www.youtube.com/watch?v=lqSmzGj_sQc</p>
<p>The song is, like most lullabies, very simple. I came up with the chords earlier today, while jamming with my ukulele. Here they are, for all my musically-inclined nerdy readers. Corrections are welcome.</p>
<blockquote><p><strong>[G]</strong> Soft kitty, <strong>[C]</strong> warm kitty,<br />
<strong>[G]</strong> little ball of <strong>[D]</strong> fur;<br />
<strong>[G]</strong> happy kitty, <strong>[C]</strong> sleepy kitty,<br />
<strong>[G]</strong> purr, <strong>[D]</strong> purr, <strong>[G]</strong> purr.</p></blockquote>
<p>Interesting trivia: they are almost the same chords as <a href="http://en.wikipedia.org/wiki/The_Lion_Sleeps_Tonight">The Lion Sleeps Tonight</a>, except for a minor difference in the last verse that shouldn&#8217;t prevent the most creative among you to fit one into the other.</p>
<p>Should you prefer so, you could play it as C F C G / C F C G C or by whichever transposition makes you happy.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.avianbonesyndrome.com/2010/09/05/chords-for-soft-kitty-from-the-big-bang-theory/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">364</post-id>	</item>
		<item>
		<title>Speed up connections to IRC servers</title>
		<link>https://www.avianbonesyndrome.com/2010/07/19/speed-up-connections-to-irc-servers/</link>
					<comments>https://www.avianbonesyndrome.com/2010/07/19/speed-up-connections-to-irc-servers/#comments</comments>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Mon, 19 Jul 2010 09:04:20 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[dcc]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[freenode]]></category>
		<category><![CDATA[ident]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=166</guid>

					<description><![CDATA[I have recently gone back to IRC — specifically Freenode — and among the delicious problems of the old days, such as the inability to easily establish DCC transfers (more on that later), I have been presented with the inevitable ident check delay during the connection to server. Ident is essentially a protocol that lets the server know what user is effectively connecting from the client machine. It can be very handy, but most people are behind NAT and/or do not run any ident daemon. This translates to a delay while the server patiently waits for an ident reply before giving up and adding a tilde to the username in the hostmask, which effectively means &#8220;this user claims to be called foobar, but I could not verify it.&#8221; In practice, this doesn&#8217;t change anything at all. The ident check timeout depends on how the IRC server is configured. Freenode takes a very&#8230;]]></description>
										<content:encoded><![CDATA[<p>I have recently gone back to <a href="http://en.wikipedia.org/wiki/IRC">IRC</a> — specifically <a href="http://en.wikipedia.org/wiki/Freenode">Freenode</a> — and among the delicious problems of the old days, such as the inability to easily establish DCC transfers (more on that later), I have been presented with the inevitable <a href="http://en.wikipedia.org/wiki/Ident">ident check</a> delay during the connection to server. Ident is essentially a protocol that lets the server know what user is effectively connecting from the client machine. It can be very handy, but most people are behind NAT and/or do not run any ident daemon. This translates to a delay while the server patiently waits for an ident reply before giving up and adding a tilde to the username in the hostmask, which effectively means &#8220;this user claims to be called <em>foobar</em>, but I could not verify it.&#8221; In practice, this doesn&#8217;t change anything at all.</p>
<p><span id="more-166"></span>The ident check timeout depends on how the IRC server is configured. Freenode takes a very conservative approach, using a timeout of 15 seconds. This is what happens:<br />
<code>[08:43:08] --- Looking up irc.freenode.net..<br />
[08:43:08] --- Connecting to chat.freenode.net (2001:6b0:e:2018::172) port 6667..<br />
[08:43:08] --- Connected. Now logging in..<br />
[08:43:08] --- *** Looking up your hostname...<br />
[08:43:08] --- *** Checking Ident<br />
[08:43:08] --- *** Couldn't look up your hostname<br />
[08:43:23] --- *** No Ident response<br />
[08:43:23] --- Welcome to the freenode Internet Relay Chat Network Jollino<br />
<em>...etc...</em></code></p>
<p>Not exactly the fastest thing. The problem here is not that I lack an ident daemon; it&#8217;s that my router filters all ports by default. A filtered port is neither open or closed, so a remote party trying to connect to it is left waiting indefinitely. After all, the lack of an immediate response might be due to a congested network. Indeed, when I tried connecting to port 113 (ident) from a remote shell, here is what happened:<br />
<code>[cyclops]$ time telnet 151.64.126.29 113<br />
Trying 151.64.126.29...<br />
telnet: Unable to connect to remote host: Connection timed out</code></p>
<p><code> </code></p>
<p><code>real    0m21.003s<br />
user    0m0.000s<br />
sys     0m0.000s</code></p>
<p>Linux&#8217;s telnet in this case seems to have a timeout of 21 seconds. Freenode&#8217;s IRC deamon waits 15. It&#8217;s still too much. Compare to what happens with a closed port:<br />
<code>[cyclops]$ time telnet 151.64.126.29 6870<br />
Trying 151.64.126.29...<br />
telnet: Unable to connect to remote host: Connection refused</code></p>
<p><code> </code></p>
<p><code>real    0m0.266s<br />
user    0m0.000s<br />
sys     0m0.004s</code></p>
<p>Much better, isn&#8217;t it? The solution is straightforward: unfiltering port 113. My router however only does that by forwarding a port to an internal machine (that is, I have to selectively pierce the NAT so that incoming connections to port X are forwarded to internal machine a.b.c.d on port Y — X and Y can be the same, of course). Is that a problem? Not really, but the recipient machine has to be active, otherwise you will incur into another connection timeout and you&#8217;re back to square one. Interestingly enough, it turns out that my router is perfectly fine with redirecting ports to itself, so I simply had connections to (external) port 113 to port 113 on itself. Here is the result from the shell:<br />
<code>[cyclops]$ time telnet 151.64.126.29 113<br />
Trying 151.64.126.29...<br />
telnet: Unable to connect to remote host: Connection refused</code></p>
<p><code> </code></p>
<p><code>real    0m0.234s<br />
user    0m0.000s<br />
sys     0m0.000s</code></p>
<p>And here is how it works when connecting to IRC:<br />
<code>[10:59:03] --- Looking up irc.freenode.net..<br />
[10:59:03] --- Connecting to chat.freenode.net (2001:6b0:5:1688::10) port 6667..<br />
[10:59:03] --- Connected. Now logging in..<br />
[10:59:03] --- *** Looking up your hostname...<br />
[10:59:04] --- *** Checking Ident<br />
[10:59:04] --- *** Couldn't look up your hostname<br />
[10:59:04] --- *** No Ident response<br />
[10:59:04] --- Jollino already in use. Retrying with Jollino_..<br />
[10:59:04] --- Welcome to the freenode Internet Relay Chat Network Jollino_<br />
<em>...etc...</em></code></p>
<p>Much better, isn&#8217;t it?</p>
<p>As for <a href="http://en.wikipedia.org/wiki/Direct_Client-to-Client">DCC</a>, the situation is more complex. The protocol works with the recipient connecting to the sender, so opening up specific ports on the router (and redirecting them to the machine where the IRC client is running) and telling the client to use such ports should work. That&#8217;s how I used to work it around years ago. However, it&#8217;s not working anymore. I can connect to myself from a remote shell, but the actual recipient won&#8217;t. In this time and age, though, it<a href="https://www.dropbox.com/referrals/NTg4NjkwMDk">&#8216;s much faster to just upload things to Dropbox and share the link</a>, so I&#8217;m not going to investigate that further.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.avianbonesyndrome.com/2010/07/19/speed-up-connections-to-irc-servers/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">166</post-id>	</item>
	</channel>
</rss>
