tag:blogger.com,1999:blog-58999576361950643422024-03-05T00:44:31.314-07:00Starshock Linux CornerStarshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-5899957636195064342.post-16669855626829551282017-09-18T22:38:00.000-06:002017-09-18T22:38:15.768-06:00Google Finance is still using flashGoogle Finance is still using flash... In 2017.<br />
<br />
Whaaaaaaaaaaaaatttttt?????Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-11863204085325977912017-08-17T14:11:00.001-06:002020-12-24T22:09:14.002-07:00Fully lazy singleton in C++/CLIToday I was trying to implement in C++/CLI the equivalent of the sixth Singleton pattern as <a href="http://csharpindepth.com/Articles/General/Singleton.aspx#lazy" target="_blank">shown here</a>.<br />
<br />
I liked the idea of using the Lazy class as it is fully lazy, and thread-safe, and very clear and simple.<br />
<br />
I couldn't find any examples of anyone else doing it, so I gave it a go. It took me a few minutes, but I was finally able to get it working:<br />
<br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">ref class Singleton<br />{<br />public:<br /> static property Singleton^ Instance<br /> {<br /> Singleton^ get() { return m_lazy_instance->Value; }<br /> }<br /><br />private:<br /> Singleton(); // Implemented in cpp<br /><br /> static Singleton^ CreateInstance() { return gcnew Singleton(); }<br /> static System::Lazy<singleton>^ m_lazy_instance = gcnew System::Lazy<singleton>(gcnew System::Func<singleton>(CreateInstance));<br />};</singleton></singleton></singleton></span></span>
<br />
<br />
The secret was knowing to pass in a gcnew System::Func delegate to the System::Lazy constructor.<br />
<br />
Note that if you naively create a System::Lazy using just the default constructor, it will compile but you will get an Exception at runtime because the Singleton constructor is private.Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com1tag:blogger.com,1999:blog-5899957636195064342.post-51311282376432260812017-08-04T23:28:00.001-06:002017-08-04T23:38:46.103-06:00Windows 8.1 blurry scaling [SOLVED]With a high-DPI display, you will likely have the display scaled to 125% or 150%. Windows may set it to this automatically (as the recommended setting).<br />
<br />
Not sure if Windows 10 has the same problem, but on Windows 8.1 when you scale to 125% the default way, the text may appear dark and blurry.<br />
<br />
<span style="color: red;"><b>Warning: Set your browser zoom level to 100% to ensure the screenshots below are not scaled by your browser, or else they won't look right! Even better, right-click save each file and view them outside your browser!!</b></span><br />
<br />
Here is an example dialog with no scaling (i.e., 100%):<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtog4WDL-1GhwFDgssW5XiC9IsxF0D2xRdMi5478UsdXdIOqMLvroCiO3IW8igJXwOtLQPGOHvEBOVTUT8ba4E7ORCcu2uTZn-lNoke_AwIGuaPt3pz-I7D8pJCK3RP67UlgeYqiH3ZA64/s1600/example_100.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="462" data-original-width="414" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtog4WDL-1GhwFDgssW5XiC9IsxF0D2xRdMi5478UsdXdIOqMLvroCiO3IW8igJXwOtLQPGOHvEBOVTUT8ba4E7ORCcu2uTZn-lNoke_AwIGuaPt3pz-I7D8pJCK3RP67UlgeYqiH3ZA64/s1600/example_100.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
Now if I set the scaling to larger (125%) as shown here:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYlYcPy9OoLLqJdMl6r37mNqK0bWaBVYk-LjDTEghXTvtHPI89N82Neppya118JpXUDSUKx4pFW7c-YqQ8wZRgHL1uiKpfMPWyrdF5fn-z07NUsPXpyFVFk-pnCEzOcwqwc9ur2EI11VVg/s1600/setting_125_blurry.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="727" data-original-width="1098" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYlYcPy9OoLLqJdMl6r37mNqK0bWaBVYk-LjDTEghXTvtHPI89N82Neppya118JpXUDSUKx4pFW7c-YqQ8wZRgHL1uiKpfMPWyrdF5fn-z07NUsPXpyFVFk-pnCEzOcwqwc9ur2EI11VVg/s400/setting_125_blurry.png" width="400" /></a></div>
<br />
<br />
Then the dialog looks like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyIuuNN1SNEf1Tmb9fb6JmwB3pFqzbt4qcI4maeQ9gH1HpGpVLjtsG2vUmbgHM09geuj8pcri4oSMgVV4Uk-3TNF8U9o2zqa8u74Nqot4eAFhjEghZ1HA-hWMl58lNxq-aCS_C7WJUWPC_/s1600/example_125_blurry.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="578" data-original-width="518" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyIuuNN1SNEf1Tmb9fb6JmwB3pFqzbt4qcI4maeQ9gH1HpGpVLjtsG2vUmbgHM09geuj8pcri4oSMgVV4Uk-3TNF8U9o2zqa8u74Nqot4eAFhjEghZ1HA-hWMl58lNxq-aCS_C7WJUWPC_/s1600/example_125_blurry.png" /></a></div>
<br />
<br />
The text is dark and blurry. And no amount of adjusting ClearType will fix it.<br />
<br />
But there is a very simple fix! Check the "Let me choose one scaling level for all my displays", as shown here:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0SiWdyC9yk3ccRJVUyaKtBBtRuZC4Ysva1eJkxW1TbmsedF146Qx3b_Ii1m9R1VKC89PLYhOuL7uvhnSBllM2c1Amyfq4sZPDTc_q0vcFfAyoc6X5Ps9aPHP6qvJ6HXMMFpy9TPeYQZNe/s1600/setting_125_good.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="726" data-original-width="1099" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0SiWdyC9yk3ccRJVUyaKtBBtRuZC4Ysva1eJkxW1TbmsedF146Qx3b_Ii1m9R1VKC89PLYhOuL7uvhnSBllM2c1Amyfq4sZPDTc_q0vcFfAyoc6X5Ps9aPHP6qvJ6HXMMFpy9TPeYQZNe/s400/setting_125_good.png" width="400" /></a></div>
<br />
<br />
Then the dialog looks like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiflBrusY-lmyjU4BzB56OEAvyOAUk5q-IVieVYNuAqRtJkxIOY1vJGkldvC1CtZZf87IeD8VRAu4vdZCA0Br030cLyKG6PLSRDiWRQyHQFjUqiEagBX0XX7J2S5xshIND8yYLZEAI4NitY/s1600/example_125_good.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="564" data-original-width="546" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiflBrusY-lmyjU4BzB56OEAvyOAUk5q-IVieVYNuAqRtJkxIOY1vJGkldvC1CtZZf87IeD8VRAu4vdZCA0Br030cLyKG6PLSRDiWRQyHQFjUqiEagBX0XX7J2S5xshIND8yYLZEAI4NitY/s1600/example_125_good.png" /></a></div>
<br />
<br />
Viola! Scaled beautifully and crystal clear.<br />
<br />
Why does Windows choose an awful, blurry scaling over beautiful, clear scaling? I realize that the default scaling is more advanced in that it handles displays with different DPIs by automatically scaling differently on each monitor. But does that mean it has to be ugly?<br />
<br />
Even if that were true, there is still no excuse for doing the ugly scaling when all of my monitors are the exact same size and exact same resolution. Windows should detect that and choose to do the good scaling, just as if I had checked the "Let me choose one scaling..." checkbox.<br />
<br />
This is why I really don't understand Microsoft.Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-72162540715054936022017-08-04T22:58:00.002-06:002017-08-04T22:58:15.438-06:00Wake on Lan not working - Windows to blameThere may be several causes, including setting in the BIOS that need to be tweaked, but every time I have had issues with WoL, it has been due to a setting in Windows.<br />
<br />
You might know already that to get WoL working, you have to go into the network adapter configuration and set "Wake on Magic Packet" to Enabled, and you might also need to set "Wake on Link Settings" to Forced (not sure). Finally, you probably need to tweak the Power Management tab to check the "Allow the computer to turn off this device to save power" and the other checkboxes in here (actually, on the contrary, I actually had to <i><b>uncheck</b></i> this checkbox, which grays out the other two).<br />
<br />
But what you may not know is that you have to turn off fast startup. Windows must put the computer in a special sleep state with fast startup, one that does not allow WoL to happen. Just guessing. In any case, to turn off fast startup go to Control Panel -> Hardware and Sound -> Power Options, click on "Change plan settings", then "Change advanced power settings", then expand "Sleep" and "Allow hybrid sleep" and set it to Off.<br />
<br />
Anyway, that's what I had to do to get WoL working.Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-54576054553944899502017-02-01T21:22:00.000-07:002017-02-01T21:22:29.005-07:00Setting up Linux Router with PPPoE for CenturyLink DSLThere were two big gotchas, for me at least:<ol>
<li>Ethernet packets must be in VLAN 201.</li>
<li>(a) Getting the right MTU and (b) clamping MSS to MTU.</li>
</ol>
Basically you just install and run ppoeconf, and it does
everything for you:<br />
<ol>
<li>configures /etc/ppp/peers/dsl-provider</li>
<li>modifies
/etc/network/interfaces</li>
<li>starts up pppd</li>
</ol>
But then there are the gotchas.<br />
<br />
<b>Gotcha #1:</b> <br />
<br />
If the ethernet packets aren't tagged with VLAN 201, then your router can send out a PADI packet, but will never get back a PADO response from the DSL access concentrator.<br />
<br />
My fix for the VLAN was easy. The DSL modem I got already had a setting to make it tag ethernet packets with VLAN 201, but I didn't know that was required when I started, so I had to find this out the hard way. If your modem can't do this for you, I know there is a way to set up a virtual interface named eth0.201 for example, but I've personally never done it.<br />
<br />
<b>Gotcha #2a:</b><br />
<br />
pppoeconf pretty much takes care of this for you, setting the MTU to 1492 by default, which really should work, but after some ping testing and whatnot, I determined that for me I needed to set it to 1484. <br />
<br />
So this is what my /etc/ppp/peers/dsl-provider looks like (with all comments removed):<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">noipdefault<br />defaultroute</span><br />
<span style="font-family: "Courier New",Courier,monospace;">hide-password<br />lcp-echo-interval 20<br />lcp-echo-failure 3<br />connect /bin/true<br />noauth<br />persist<br /><u>mtu 1484</u></span><br />
<span style="font-family: "Courier New",Courier,monospace;">noaccomp<br />default-asyncmap<br />plugin rp-pppoe.so eth1<br />user "myppoeuser@qwest.net"</span><br />
<br />
<b>Gotcha #2b:</b><br />
<br />
pppoeconf actually handles this for you as well, by creating a file in /etc/ppp/ip-up.d named 0clampmss with this firewall rule:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">iptables -t mangle -o "$PPP_IFACE" --insert FORWARD 1 -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:65495 -j TCPMSS --clamp-mss-to-pmtu</span><br />
<br />
Without this, some websites might work and others might not. Some might load partway, etc. That's what was happening to me, and I finally realized the problem was this rule had gone missing. It was because I have my own firewall script that I had run, which flushes all the chains and adds just the rules I want. So I needed to add a rule for this to my firewall script.<br />
Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-50683001873605460122015-05-21T22:21:00.003-06:002017-02-01T21:26:59.819-07:00Animated Emoji in Gmail subject line - the 90s are back!A few weeks ago I noticed several emails in my spam folder in gmail had animated icons in the subject line, such as blinking stars.<span id="goog_1350660200"></span><span id="goog_1350660201"></span><br />
<br />
I couldn't believe my eyes. I didn't even know about <a href="http://en.wikipedia.org/wiki/Miscellaneous_Symbols_and_Pictographs" target="_blank">colored</a> <a href="http://en.wikipedia.org/wiki/Emoticons_%28Unicode_block%29" target="_blank">emoji</a> characters, let alone animated emoji! And how could it get into a subject line?<br />
<br />
Terence Eden explains it pretty well in a blog post <a href="https://shkspr.mobi/blog/2015/05/how-gmail-lets-spammers-grab-your-attention-with-emoji/" target="_blank">here</a>. I like how he focuses on the fact that spammers can and will use this to catch people's attention. Way to go Google. Thanks a lot!<br />
<br />
Google has defined some special Unicode characters that they will automatically turn into embedded images in the subject line. What's next Google? The <a href="http://themarqueeblink.com/" target="_blank">marquee blink</a>? The 90s are calling and they want their geocities back! <br />
<br />
At least with normal characters, even colored emoji Unicode characters, I can control how they look. E.g., if I don't want color, I can uninstall the "Segoe UI Emoji" font. But when Google turns characters into embedded images, they control how it looks.<br />
<br />
The best I could do was install the <a href="https://addons.mozilla.org/en-US/firefox/addon/toggle-animated-gifs/" target="_blank">Toggle animated GIFs</a> Firefox extension.<br />
<br />
Please Google, get rid of this nonsense! Don't make me go back to using <a href="http://en.wikipedia.org/wiki/Mutt_%28email_client%29" target="_blank">mutt</a> all the time!Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-42961471922849553372014-01-20T21:40:00.000-07:002014-01-20T21:40:02.787-07:00df showing ugly uuid for root deviceI found that after upgrading debian to wheezy the df command was showing a long name for the root device instead of the real normal short name like /dev/sda1.<br />
<br />
/dev/disk/by-uuid/4661950b-0d92-4a1d-9919-2b71eaa14189<br />
<br />
I found <a href="http://blog.mbentley.net/2013/09/df-reports-root-fs-as-by-uuid-symlink-instead-of-actual-device/">this link</a> very helpful in explaining the problem and giving a workaround.Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-69502614387625053342012-09-09T22:23:00.005-06:002012-09-09T22:26:32.146-06:00<h3>
Building a single kernel module on Debian.</h3>
I was trying to build snd-seq-oss.ko so I could run the old playmidi that requires OSS /dev/sequencer, but when I did the insmod I got a -1 "Invalid module format" and dmesg showed "snd_seq_oss: no symbol version for module_layout".<br />
<br />
I found out the problem was that since I am building just the module not the kernel, I need the Module.symvers from the distro's kernel. So the solution in this case was to install linux-headers-2.6.32-5-686 and copy the Module.symvers from there.<br />
<br />
There's probably other ways to do it but that is what worked for me. See steps below for future reference.<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;">
sudo -i</div>
<div style="font-family: "Courier New",Courier,monospace;">
apt-get install linux-headers-2.6.32-5-686 linux-source-2.6.32</div>
<div style="font-family: "Courier New",Courier,monospace;">
cd /usr/src</div>
<div style="font-family: "Courier New",Courier,monospace;">
tar -jvxf linux-source-2.6.32.tar.bz2</div>
<div style="font-family: "Courier New",Courier,monospace;">
ln -s linux-source-2.6.32 linux</div>
<div style="font-family: "Courier New",Courier,monospace;">
cd linux</div>
<div style="font-family: "Courier New",Courier,monospace;">
cp ../linux-headers-2.6.32-5-686/Module.symvers .</div>
<div style="font-family: "Courier New",Courier,monospace;">
cp /boot/config-2.6.32-5-686 .config</div>
<div style="font-family: "Courier New",Courier,monospace;">
(modify .config as desired)</div>
<div style="font-family: "Courier New",Courier,monospace;">
make oldconfig</div>
<div style="font-family: "Courier New",Courier,monospace;">
make prepare</div>
<div style="font-family: "Courier New",Courier,monospace;">
make modules_prepare</div>
<div style="font-family: "Courier New",Courier,monospace;">
make SUBDIRS=scripts/mod</div>
<div style="font-family: "Courier New",Courier,monospace;">
make SUBDIRS=path/to/module modules</div>
Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-69030056018032735472011-03-14T21:31:00.004-06:002012-09-09T22:15:41.230-06:00Use right alt as Windows key in Debian SqueezeMy Thinkpad has no Windows key, so I was using a startup file with xmodmap commands to map my right alt to the Windows key (Super_L).<br /><br />That worked great until I updated Debian to Squeeze. Then it would only work if I ran it manually after Gnome came up. I tried several startup scripts with different names including .gnomerc, but my settings just wouldn't stick.<br /><br />So I decided it must be getting overridden by a later step, probably a step where it checks gnome-keyboard-properties settings and calls setxkbmap, so that resets anything you tried to do in a start-up script.<br /><br />There is an option in gnome-keyboard-properties for "Left Alt is swapped with Left Win". That causes it to run setxkbmap -option altwin:swap_lalt_lwin I believe. That would work perfectly for me, except I want to map the right alt, not the left alt.<br /><br />So finally, here is what I came up with (probably not the right solution, but it works). I edited all the files in /usr/share/X11/xkb/rules/ with swap_lalt_lwin in them and added a similar line/section called swap_ralt_lwin. Similarly I edited /usr/share/X11/xkb/symbols/altwin and added a section at the bottom for swap_ralt_lwin that works similar to the swap_lalt_lwin section.Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-49745245775919133742011-02-09T20:42:00.005-07:002011-02-09T20:49:58.407-07:00Debian Lenny to Squeeze on Thinkpad T42<span style="font-weight: bold;">The good:</span><br /><ul><li>Faster bootup.</li><li>Very fast switching between X and a VT.</li><li>Firefox 3.5 is much faster than 3.0.</li><li>Most Thinkpad extra keys now work great out of the box.</li><li>Cool desktop backgrounds.</li></ul><span style="font-weight: bold;">The bad:</span><br /><ul><li>X11 looked funny. Turns out no themes were installed. Had to install gnome-themes.</li><li>Got a bunch of warnings from udev on bootup, coming from z60_xserver-xorg-input-wacom.rules, so I purged xserver-xorg-input-wacom.</li><li>The ACPI hotkey events changed names, so some hooks I had set up in /etc/acpi/events stopped working until I updated the names.</li><li>EmulateWheel setting in xorg.conf no longer works. xinput works. I installed gpointing-device-settings, which is a very convenient solution.<br /></li><li>Alt_R keycode is now 108 instead of 113.</li></ul><span style="font-weight: bold;">The ugly:</span><br /><ul><li>X wouldn't start. Turns out it was because gdm wasn't installed. Why did gdm get removed during upgrade? Maybe it wanted to replace it with gdm3? But it didn't install gdm3.<br /></li></ul>Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com1tag:blogger.com,1999:blog-5899957636195064342.post-20744831285016691092011-01-04T21:35:00.008-07:002012-09-09T22:16:17.356-06:00Samba - How to ignore trusted domains completelyFor reasons similar to those mentioned <a href="http://lists.samba.org/archive/samba-technical/2007-October/055974.html">here</a> by Dmitry Butskoy, I needed to make winbind exclude trusted domains. But like he said, "allow trusted domains = no" doesn't seem to affect winbind in this context.<br /><br />So I built winbindd from source, commenting out the call to rescan_trusted_domains() as Dmitry mentioned <a href="http://lists.samba.org/archive/samba-technical/2007-October/055997.html">here</a>, and it works exactly how I want now!<br /><br />Looking at the latest version of Samba, 3.5.6, it appears to still not apply that setting in this context. I think rescan_trusted_domains() ought to check lp_allow_trusted_domains() and return if it is false.<br /><br />If anyone on the Samba team is reading this, I hope you will consider making that change. Hmm, maybe I should submit a patch...Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-82173229221575502372011-01-03T12:46:00.005-07:002018-11-11T12:35:14.674-07:00Windows 7 source address selection and unique local addressesI set up IPv6 on my Linux router, and everything works great, except my Windows 7 box cannot connect to ipv6.google.com, because it uses my unique-local address (ULA) instead of my 6to4 address as the source. Since ULAs are not globally routable, why would Windows even consider using it when connecting to a public address?<br />
<br />
The same problem is described <a href="http://www.sixxs.net/forum/?msg=general-2642533">here</a>, and the workaround of modifying the prefix policy table does fix it for me, but I too feel it is a hacked/broken solution. (It is however, definitely the correct fix for making Windows <a href="http://social.technet.microsoft.com/Forums/en/w7itpronetworking/thread/b4d504c8-2ae9-41f3-bf21-e2e5d7d9704f">prefer IPv6 over IPv4</a> when connecting to dual stack hosts.)<br />
<br />
A "better" workaround I think would be to add a prefix policy of fc00::/7 with its own label and a lower priority. I think that would make it prefer my 6to4 address. Unfortunately, when I run <br />
<pre>netsh interface ipv6 add prefixpolicy fc00::/7 4 6</pre>
it doesn't add it right :( It shows up as just ::/7, which is the same problem as described <a href="http://www.broadbandreports.com/forum/r23888054-Problem-with-the-prefixpolicy-settings-in-windows">here</a>.<br />
<br />
So although I believe Windows is using the correct policy table as per <a href="http://www.faqs.org/rfcs/rfc3484.html">RFC 3484</a>, I think it is a bug for Windows to use a ULA as the source when connecting to a public address, and I think it is a bug that it will not let me add a prefix policy for fc00::/7.<br />
<br />
Thoughts?<br />
<br />
<b>Update (2018-Nov):</b><br />
<br />
Interestingly, in Sep 2012 (about 2 years after this blog post), <a href="https://tools.ietf.org/html/rfc6724#section-2.1">RFC 6724</a> came out (replaces RFC 3484), and it <i>does</i> include a policy for fc00::/7 with its own label. Since current versions of Windows use the policy table defined in RFC 6724, this bug no longer exists.<br />
<br />
Wow, I must be prophetic! :) Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com2tag:blogger.com,1999:blog-5899957636195064342.post-58040238037510440272010-08-13T16:45:00.007-06:002010-08-13T16:49:56.841-06:00Perl scripts to assemble/disassembleI wrote a couple little perl scripts that allow interactive entry of x86 assembly or machine hex and converts between them. It uses nasm under the hood to assemble and x86dis under the hood to disassemble.<br /><br />You can find them <a href="http://hellewell.info/phillip/linux/download/scripts/assembly/">here</a>.Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-41689284536694008182010-06-06T18:42:00.010-06:002011-01-03T13:35:56.785-07:00Debian Linux 5 (Lenny) on Thinkpad T42I know it seems backwards, but I recently switched from Ubuntu to Debian on my old reliable Thinkpad T42 laptop. Here are some of the problems I encountered and tweaks I made to get it working nicely.<br /><br /><span style="font-weight: bold;">Back and forward keys, and right alt as windows key:</span><br />1. Set up .xinitrc<br /><span style="font-size:85%;"><span style="font-family:courier new;"> #!/bin/sh</span><br /><span style="font-family:courier new;"> xmodmap -e "keycode 113 = Super_L" # reassign Alt_R to Super_L</span><br /><span style="font-family:courier new;"> xmodmap -e "remove mod1 = Super_L" # make sure X keeps it out of the mod1 group</span><br /><span style="font-family:courier new;"> xmodmap -e "keycode 234 = XF86Back" # Back button.</span><br /><span style="font-family:courier new;"> xmodmap -e "keycode 233 = XF86Forward" # Forward button.</span><br /></span>2. Add command to gnome session to run .xinitrc<br /><br /><span style="font-weight: bold;">Fix the "Access IBM" and "Alt-Space" keys:</span><br />1. Add to /etc/rc.local<br /><span style="font-size:85%;"><span style="font-family:courier new;"> # Dumb kernel drops the acpi_fakekey.</span><br /><span style="font-family:courier new;"> /usr/bin/setkeycodes e017 148 # (for the Access IBM button)</span><br /><span style="font-family:courier new;"> /usr/bin/setkeycodes 0082 192 # (for the Fn+SPACE combination)</span><br /><span style="font-family:courier new;"><br /></span></span><span style="font-weight: bold;"></span><span style="font-weight: bold;">Emulate mouse wheel in X with middle button:</span><br />1. Add these three lines to /etc/X11/xorg.conf in the "Configured Mouse"<br /><span style="font-size:85%;"><span style="font-family:courier new;"> InputDevice section:</span><br /><span style="font-family:courier new;"> Option "EmulateWheel" "true"</span><br /><span style="font-family:courier new;"> Option "EmulateWheelTimeOut" "200"</span><br /><span style="font-family:courier new;"> Option "EmulateWheelButton" "2"</span><br /></span><br />Note: Lenny uses XServer 1.4.2, which does use HAL, but not as fully as 1.5 or something because I couldn't get it to work with a .fdi file.<br /><br /><span style="font-weight: bold;">Make Fn-F5 toggle just bluetooth, not wireless:</span><br />1. Copy <a href="http://hellewell.info/phillip/linux/download/scripts/thinkpad/bluetooth_toggle.sh">bluetooth_toggle.sh</a> to /usr/local/sbin/<br />2. Change the action line in /etc/acpi/events/ibm-wireless to:<br /><span style="font-size:85%;"><span style="font-family:courier new;">action=/usr/local/sbin/bluetooth_toggle.sh</span></span><br /><br /><span style="font-weight: bold;">Make Fn-F7 toggle between LCD,TV,and TV+LCD</span><br />1. Copy <a href="http://hellewell.info/phillip/linux/download/scripts/thinkpad/video.sh">video.sh</a> to /usr/local/sbin/<br />- (borrowed heavily from <a href="http://www.thinkwiki.org/wiki/Sample_fn-F7_script">this script</a>.<br />2. Change the action line in /etc/acpi/events/ibm-videobtn to:<br /><span style="font-size:85%;"><span style="font-family:courier new;"> action=/usr/local/sbin/video.sh toggle</span></span><br />3. Enable Fn-F7 by modifying the options line in /etc/modprobe.d/thinkpad_acpi.modprobe to:<span style="font-size:85%;"><span style="font-family:courier new;"><br />options thinkpad_acpi hotkey=enable,0xffffff experimental=1</span></span>Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0tag:blogger.com,1999:blog-5899957636195064342.post-70550366058256652052010-06-06T18:38:00.004-06:002010-06-06T18:58:06.854-06:00Welcome to my new blog siteWelcome to my new blog site. I figured I might as well let Google host my blog, since that will make it easier to moderate spam.<br /><br />Here is the location of my old blog: <a href="http://hellewell.info/phillip/blogs/">hellewell.info/phillip/blogs</a>. If you have any comments about any of the posts on my old blog, you may make them here.Starshockhttp://www.blogger.com/profile/18362663985923911231noreply@blogger.com0