Posts

Boot MacOS under VirtualBox

Introduction The following steps are needed to boot Mac OS under VirtualBox. I tested it using Mac OS X 10.13. I can't guarantee this works. You'll need a source/original mac to copy the OS install. Probably Apple won't approve of this because they want you to buy their original hardware, but sometimes you need hosted VMs in the cloud or similar, and they don't really offer that. Steps Commands below are typed in a command line like the Terminal. 1. On a Mac, do this to download an installer disk: softwareupdate --fetch-full-installer --full-installer-version  ... OR download from the app store. If the operating system you want to install is out of date, ie if the Mac tells you the installer is damaged, set your Mac date and time to however many years ago that operating system came out, and turn of automatic date and time in the date and time system preferences. That way the signature of the installer disk / bundle will still be valid (it is invalid if it is older than

Spotting a phishing (hacker) email

Image
  How to spot a phishing email A phishing email is an email which looks legitimate but which tricks you into clicking a dangerous link or giving over your credentials to login to other systems like social media or banks. Many people receive phishing emails. They are sometimes convincing.  General properties They look convincing You feel a sense of urgency to deal with the email due to the implied problem They do not actually come from the system in question even though they say they do  Their email layout looks like the normal system email layout that you might get from the true system (e.g. your bank or facebook or whatever), but there are telltale signs that it is not from that system. They might have attachments, e.g. a fake bank statement, or fake password reset. In this post I will show you a few mails, starting with a fake Facebook password reset email. If we look at the above, we will see how to (A) detect that it is not actually from the real system, and (B) how to spot that th

Windows updates and wipes your linux bootloader

 If windows updated and wiped your linux bootloader, follow these steps.  https://techblog.dev/posts/2021/12/how-to-fix-missing-grub-boot-menu-after-a-windows-update/  

Building an OR gate

Image
In this post we see how to build a logic OR gate. It's actually really simple to understand. Let's take a case where you want your car windows to wind up automatically, if either the engine is stopped OR the door is open (realistically you might not want that, but this is just a thought experiment). We are looking at two states: engine running (true/false) and door open (true/false). Using "1" for "true" and "0" for false, we want the window to wind up if either or both are true. So this is the truth table (v = OR): Engine on v Door closed = wind up Engine off v Door open = wind up Engine off v Door open = do not wind up Engine on v Door open = wind up 1 v 0 = 1 0 v 1 = 1 0 v 0 = 0 1 v 1 = 1 This also corresponds directly to English. "If my car door is open OR the engine is running, wind up the window, otherwise do not." Here's the actual circuit and a video.  

Building an AND-gate (logic flow/logic gate)

Image
 In this post we see how to build a logic AND gate. It's actually really simple to understand. Say you have a car door and a car ignition. On the car door you have a magnetic switch that lets a wire spring back to closed mode when the door is open. Ignition has electricity through it when the engine is on. SO you have live current in both scenarios, right? Call that state 1 and 1 Now consider a state where either the ignition is off AND the door is open, OR the door is closed AND the ignition is off. Call that state 0 and 1 or 1 and 0 (1=open/on, 0 = closed/off). Now suppose you want the interior head light in the car to turn on when the door is open and the ignition is on. You put a lightbulb on a wire. Then leading to that set of wiring you have this thing I made = an "and gate". You have electricity from the door and engine going there. The and gate does this: engine on , door open = 1 and 1 = true. Electricity must go to the light above your head. engine off, door ope

Install Cygwin on Windows

Cygwin is a Linux command line emulator. https://cygwin.com/install.html Once it is installed, you will need to manually install other packages to let you build the software. Take the warning seriously: do not install everything, you will download hundreds of gigs of software you do not need. Rather install the specific dependencies. Once cygwin is installed, it will not, by default, set your home directory (home folder) to c:\users\yourname However, generally you DO want to do that, so you can use linux commands on your own files. To set that, follow the steps here: https://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation The packages I strongly recommend you install are rsync, ssh, openssh, curl  and wget Starting with Cygwin 1.7.34 , the recommended way to do this is to add a custom  db_home  setting to  /etc/nsswitch.conf . A common wish when doing this is to make your Cygwin home directory equal to your Windows user profile directory. T

Fake flash disks

Believe it or not, you get fake flash disks. What these do is they misreport their capacity. So, they might say they are 500 GB in size but actually they're only 14 GB, and really they're 16 GB drives that failed quality control. Wish.com is particularly bad in this regard; literally every single drive I've bought from there has been fake flash. To test a drive to see if it is fake or lying about its size, try use f3 (fight flash fraud). https://fight-flash-fraud.readthedocs.io/en/stable/ It's a commandline utility available for mac and linux that lets you test a drive and program it to "learn" its actual/true usable size. It does this by testing every block, and when it starts getting write failures (or read verification failures), it marks that as the actual end of the disk. I've found that regardless of what size a fake flash disk says it is, it is usually 12-14 GB in size, never what it actually says. As the story goes, if it seems to good to be true,