Browsed by
Category: Problem solutions

Setting up a Raspberry Pi-hole

Setting up a Raspberry Pi-hole

Ad blockers such as uBlock Origin and Adblocker make the web usable – but are not available on every platform and not of the same quality.

Pi-hole is an Linux-based server setup that absorbs ads by filtering DNS requests. You set up the Pi-hole server on a simple Raspberry Pi, set your devices to use the pi-hole server to resolve DNS entries, and voila – any requests to ad sites are immediately and transparently absorbed.

This is far superior to ad block applications for a few reasons. First, because the websites doesn’t even know you’re using it, you will never get those annoying ‘disable adblock to continue’ messages. With a little extra work, you can make your wired/wireless router also run DNS requests through it so that all devices wifi connected phones/laptops/game systems/etc get free ad filtering.

I just set one up this weekend on a raspberry pi and it’s been interesting to play with so far. Pi-hole has been a bit too fiddly in the past, but seems to be working pretty well these days with a slick web interface and easy installation. So far, it has worked really well – but I do occasionally get a false positive and have to turn the filtering off. I’ll give it a few days and see if it grows on me.

Here’s the instructions I used: https://blog.cryptoaustralia.org.au/instructions-for-setting-up-pi-hole/

Changing the DNS for your Win10 system while still using DHCP:
https://www.windowscentral.com/how-change-your-pcs-dns-settings-windows-10

Setting up SSH after install on your raspberry pi so you can access your pi hole via windows/putty/etc.
https://www.raspberrypi.org/documentation/remote-access/ssh/

Here’s the parts list from Amazon:

Raspberry Pi 3 b+ Case, iUniker Raspberry Pi 3 Model B+ Transparent Case with Raspberry Pi Heatsink for Raspberry Pi 3B+, 3B, 2B – Access to All Ports (Clear) $5.68
Samsung 32GB 95MB/s (U1) MicroSDHC EVO Select Memory Card with Adapter (MB-ME32GA/AM) $7.49
Element14 Raspberry Pi 3 B+ Motherboard $36.97
iTrunk Raspberry Pi 3 Model B+ (B Plus) Power Supply, 5V 2.5A Extra Long 2M Micro USB Power Supply Charger Adapter for 2018 New Version Raspberry Pi $8.15
Windows 10 99% memory usage even when nothing is running

Windows 10 99% memory usage even when nothing is running

Running out of memory while running Windows isn’t exactly a new phenomenon. But since Windows 8, things have mostly gotten better from memory usage/performance.

I recently ran into an issue where I’d close down all of my apps, but leave my system on overnight. When I’d jiggle the mouse in the morning, I would be greeted with horrendously sluggish drive swapping and 100% memory utilization. On a system with 32 gigs of memory. Even worse, I opened up my task manager and shut down everything possible – but nothing was indicated where 25+ gigs of memory went. Bad job Microsoft, shouldn’t your performance tools be able to tell me what is using up 90% of my system memory?

I got a clue from the fact my non-pageable memory usage was huge. This, apparently, indicates a driver or service with a memory leak:
https://windows101tricks.com/fix-memory-leak-problem-on-windows-10/

The problem was the Killer Network Suite. Apparently, this is a pretty common problem with the Killer network driver. I uninstalled it, and the problems seemed to go away.
https://www.reddit.com/r/buildapc/comments/3yzjyz/killer_network_suite_gave_me_a_major_memory_leak/

I then downloaded and installed the DRIVER ONLY package for the network interface by going directly to the Killer network website.

Turns out that the Killer network suite unfortunately lives up to it’s name: it certainly killed all the memory on my system. 🙁

MacOS 10.14 Mojave in VMWare

MacOS 10.14 Mojave in VMWare

Developing a iOS app used to require buying a Macbook or Mac mini. With VMWare, it is no longer necessary. I used VMWare Workstation 15.0 Pro and was able to develop an app and debug it on real iPad/iPhone hardware. Setup instructions are here:
https://techsviewer.com/install-macos-mojave-vmware-windows/

Here’s the latest VMWare Mojave 10.14.4, 18E226 (March 25, 2019) image:

Further tips after the above setup

Sprite Dicing

Sprite Dicing

Handy technique for saving texture space! There are various tools to do this, but the basic scheme is to split up a large texture into much smaller chunks, individually trimming these chunks, and seamlessly reconstructing the sprite in the viewport.

Source image
Compresses down to this!
Backdoor Roth IRA

Backdoor Roth IRA

Getting your backdoor Roth IRA right is very tricky. If done incorrectly, you can find yourself owing a ton of money and more than negating the value of contributions.

Here’s the best/most correct covering of the topic:

Here is a higher-level discussion:
https://www.dadsdollarsdebts.com/2016/11/22/roth-401k/

Also look here for much more in-depth information:

https://www.kitces.com/blog/how-to-do-a-backdoor-roth-ira-contribution-while-avoiding-the-ira-aggregation-rule-and-the-step-transaction-doctrine/

Attaching 5.25″ floppies via USB

Attaching 5.25″ floppies via USB

Floppy disks are a relic of the past these days. You can still see the odd 3.5″ floppy – and there are even still companies making 3.5″ USB drives you can plug into your system today. But 5.25″ floppy drives (360k and 1.2 meg variety) are much more scarce. So scarce, in fact, that you’re likely not to find any outside of an old vintage computer. Most modern PC’s since the Pentium don’t even have connectors, interfaces that support them, and I know of no vendors that make USB 5.25″ drives.

So what is one to do if they have old 5.25″ floppies they need to read? Turns out others have had the same problem – so you’re not alone.

Here’s some options:

  1. Find a service that will convert them – Usually for a fee around $5-$25 per disk.
  2. Buy an old vintage Intel pre-Core based computer from eBay that has a working 5.25″ drive.
    This means a 486 or lower computer. Almost all plug-in floppy controllers require a PC who’s motherboard has an ISA interface (not PCI). You must also be careful because older 8-bit ISA floppy controllers (from the XT/AT era) often will NOT work in faster 386/486/Pentium ISA interfaces (even though they are supposed too).
  3. Use a 5.25″ to USB converter:
    1. GreaseWeasle V4 [NEW 2022]https://decromancer.ooo/greaseweazle/
      Interfaces with 8″, 5 1/4″, and 3 1/2″ drives. Amazingly, it only costs $31 CAD and seems to get as good reviews as the Kryoflux. Definitely one of the cheapest options on this list. Since it extracts the raw flux transitions from the drive, any diskette format can be captured and analyzed – PC, Amiga, Amstrad, PDP-11, many older electronic musical instruments, and industrial equipment. The Greaseweazle also supports writing to floppy disks. The design is fully open and comes with no license encumberment.
      [UPDATE 10-2022] I just bought one of these and could not be happier. It’s pretty sweet!
    2. Kryoflux https://www.kryoflux.com/
      The Holy Grail of floppy readers, but not cheap at 105€. It is able to read all formats, save as a raw stream, or export to common sector formats like the Acorn Electron, Apple, Amstrad CPC, Archimedes, Atari 8-bit, Atari ST, BBC, Commodore 64, Commodore Amiga, MSX, IBM PC, PC-8801, Sam Coupe, Spectrum, E-MU Emulator & Emulator II, DEC RX01 & RX02 and many others.
    3. Device Side Data’s FC5025http://www.deviceside.com/fc5025.html
      USB 5.25″ floppy controller plugs into any computer’s USB port and enables you to attach a 5.25″ floppy drive. Even if your computer has no built-in floppy controller, the FC5025 lets you read those old disks. It also understands formats used by Apple, Atari, Commodore, TI, and others.
    4. Supercard Prohttps://www.cbmstuff.com/
      I don’t know very much about this one, but here’s a review and this page which contains a lot of useful information.
    5. DREM – https://www.drem.info/
      DREM is a MFM/RLL hard drive emulator that can read raw dumps of a hard drive. It also allows you to read floppies. More here.
  4. ISA on modern PC’s

Cables/Adapters for connecting 3.5/5.25/8″ floppy drives to your PC:

  • CablesOnline http://www.cablesonline.com/
    CablesOnline has a good selection of universal floppy cables for a very reasonable price.
  • Dbit http://www.dbit.com/fdadap.html
    The DBit FDADAP board is a small adapter which adapts 8″ floppy disk drives (Shugart SA800 style bus) to work with the PC 3.5″/5.25″ floppy disk cable pinout. It has 34- and 50-pin connectors which can be connected to the PC floppy controller and the 8″ disk drive using simple straight-through ribbon cables (not included), and a 3.5″ style power connector for the on-board microcontroller

Dead/Discontinued controllers

  • Catweasel http://www.nishtek.com/cw.html
    Discontinued PCI board for connecting to floppies. Like other solutions, it doesn’t make drives show up as a drive letter – but rather lets you read raw formats for all sorts of platforms.

Other resources/discussions:

Replacement fans on 2016 Razer Blade 14″ laptop

Replacement fans on 2016 Razer Blade 14″ laptop

I recently bought a used 2016 14″ Razer Blade M970 (RX09-01652E22) gaming laptop for about 20% the price of a new one (seems the only things that lose value faster than a Porsche driving off the lot are gaming laptops with last gen technology). I needed this one since it had a high-end GPU that allowed me to do modern DX12/Vulkan work, while being in a nice transportable 14″ slim form factor (it had a M970 graphics card).

While a screaming deal, there was one other noise problem: the fans. Gaming laptops are kind of notorious for needing powerful fans to cool their graphics cards. Both the fans in this laptop were starting to make bearing noises. The temps were fine and the fans worked ok – they were just a little noisier than they should have been. I took them out and cleaned them, but same result.

The originals are Cooler Master FB07006M05SPA312’s. DC 5v 0.5A, 4 pin connector.

Unfortunately, finding these guys turned up next to zero hits. Best options I could find were:

  1. Live with it – but know the fans might be dying/making more noise soon.
  2. Send it in to Razer and they’re replace them out of warranty. They charged a flat $100 rate + parts (they quoted me about $20) + shipping. About $150. Ouch.
  3. Buy used fan/heat-sink assembly off eBay. They were still charging around $40, and the fans were definitely all used. They could have the same noise issues as I was having – or have them soon.
  4. Dig deeper.

Found:

I opted for #4 and found a company on AliBaba that hit the spot. I found this vendor selling off-brand versions that looked and speced out right. I took the gamble since the price was $32 for 2 fans – a SCREAMING deal:
https://www.aliexpress.com/item/2PCS-CPU-fan-for-GIGABYTE-Razer-Blade-14-RZ09-01161E31-RZ09-01161E31-R3U1-laptop-cpu-cooling/32841110492.html

They arrived about 2+ weeks later as I opted for the free shipping. I popped out the old ones and can confirm these look and fit identically to the originals – sans the CoolerMaster stickers. They appeared to be brand new. Temps all appeared fine after gaming for well over an hour. They revved up to full power and then back down to idle perfectly. Best of all – they were nice and quiet. Success!

Alternative:

If you are looking for originals, I found these at $65/each, but that’s pretty steep to me:
https://www.aliexpress.com/item/Emacro-for-Cooler-Master-FB07006M05SPA312-Server-Round-Fan-DC-5V-0-5A-4-wire/32887795069.html

 

 

1.7 days – on average

1.7 days – on average

Glad to know our doctors and academics are still producing lots of great papers. While some things like magnets are seriously dangerous if swallowed, the goal of this one was to get over-protective parents to calm down about the risk of many other commonly swallowed household items.

Six pediatric health‐care professionals were recruited to swallow the head of a Lego figurine. The professionals then examined their stool samples for the next few days to determine:

  1. If Lego pieces passed through their system or got stuck
  2. The time it took to pass the Lego piece.

Full paper here:
https://onlinelibrary.wiley.com/doi/full/10.1111/jpc.14309

SMB1 is unsafe

SMB1 is unsafe

If you use samba and connect to it via Windows, you might get a message that says:

You can’t connect to the file share because it’s not secure. This share requires the obsolete SMB1 protocol, which is unsafe and could expose your system to attack.

The right solution is to update the Linux Samba share software/service. Unfortunately, that’s not always possible – especially if the server is not yours. The only recourse is to find another solution, contact the server owner to update it, or accept the risk.  Installing support for SMB1 opens you to the risk of various attacks – including a brutal man-in-the-middle that exposes everything. It’s a good idea to do whatever you need, then disable the protocol, because a compromised server/man-in-the-middle might block safer SMB2.x/3.x protocols which might make your system fall back to the unsafe v1.x without you knowing it.

At any rate, sometimes you have to accept the risk. Here’s how to install/enable smb1 on Windows if all else fails:

  1. Run Powershell command processor in elevated mode (run as admin)
  2. Type the following command:
    get-windowsoptionalfeature -online –featurename smb1protocol
  3. Once SMB has been installed please type the following command to activate it:
  4. enable-windowsoptionalfeature -online –featurename smb1protocol
  5. Once done, press Y and hit enter to restart your computer.