Half-Elf on Tech

Thoughts From a Professional Lesbian

Tag: hardware

  • Shut Your Pi-hole

    Shut Your Pi-hole

    One of the things that bothers me about the internet is tracking and ads. Mostly I hate trying to read things like IMDB and having it take a minute (60 to 90 seconds) to load, because of ads.

    Now I have nothing against ads! I use them on my sites to limited success. I click on them on Instagram from time to time. But the way many sites use ads and tracking is a little obscene to me. It makes it impossible to browse the net. And worse, the add-ons for our browsers don’t always work.

    Enter the Pi-hole

    I blame my friend Jan, who loves Raspberry Pi’s, for the thought. A Raspberry Pi is a mini computer. It’s the bare bones you need to computer. If you think about how small something like an Amazon Fire Stick is, you have the idea. They’re itsty. But they work. And they work because they have a stripped down operating system that does very little but the basics.

    On top of that, we can add software like Pi-hole. A Pi-hole is custom software that watches your internet traffic and blocks ads before they get to your computer. It works by intercepting DNS traffic and checking it against blacklists. If something, like an ad network, is on a blacklist, it blocks.

    Finding Your Pi

    In order to build this you need a Pi. I bought a kit. I don’t want to hear about it. I don’t need more, I didn’t want more. I wanted, and I got, the basic kit that had what I needed. I bought a Vilros Pi Zero W, which means it’s the smallest, least extendable Pi out there.

    The kit came with the following:

    • A Pi circuit board
    • A case (with three lids)
    • Rubber feet for the case
    • A heat sink
    • A camera connector (but no camera)
    • A 2×20 pin set
    • Adapters for HDMI and power and USB

    In addition I bought an Ethernet connector because I didn’t want to use WiFi, and a mini SD card.

    Putting it together is like LEGO’s, however there were NO directions. Did I need the pins? Did I need the camera? In the end, I attached the heat sink and left it at that. The pins only matter if I’m soldering things and I don’t want a camera.

    Installing the OS

    The tricky part here is normally people say “connect a monitor and keyboard…” but I didn’t want to do that. I don’t have a spare monitor (though I could use my TV and briefly did for a debug) and I don’t have a spare keyboard. All of this I did on my MacBook.

    Go to the official page and download Raspbian LITE. This is the minimalistic version of the official operating system. Download the zip and open it. You’ll get an IMG file. Hold on to it. You also want to download an image builder. I used Balena Etcher, which is a free and open source tool to flash an SD card with an operating system. Or in layman’s terms, it installs that image you downloaded onto the card and magically makes it work.

    Insert your SD card and run Balena. Tell it to install your image to the SD card. This takes about 5 minutes, depending on your systems. Once it’s done, you will need to eject the card and then reinsert it. This is because the MacOS can be tetchy. Once the disk is mounted on your Mac, you need to add an empty file called SSH to the main folder. This will allow you to SSH into the Pi when you’re done.

    Plug It In

    Okay! Now we go back to the hardware. Eject your disk from your Mac and insert it into your Pi. Put the Pi into the case and click it into place. Make sure the various ports line up with the holes. Once that’s in, put the lid on and attach the HDMI adapter (just in case), the Ethernet Adapter (and plug that cable in) and the power.

    Your Pi will boot in a matter of seconds. Go get a glass of water. Come back. Now we’re ready to go!

    Update All the Things

    Before we install Pi-hole, we want to upgrade everything.

    To do that we need to know our Pi’s IP. I went to my router’s web interface and scanned the list of devices for raspberrypi. It’s under the DHCP allocation table. Get the IP address of your Pi. With that address, SSH into your Pi.

    ssh pi@123.45.67.89
    

    The default password is raspberry.

    You will be shown raspi-config on first logging in. Press the number 2 and change the password to something better. If you want to run that screen later, you’ll need to run sudo raspi-config

    Now we update! To update everything, run sudo apt-get update — this downloads all the things you need. Next you run the upgrader – sudo apt-get dist-upgrade – to install it all. If this fails, it will have advice on how to proceed. Read carefully!

    We also want to install Git tools: sudo apt-get install git net-tools

    And you may want to change your timezone: sudo dpkg-reconfigure tzdata

    Install Pi-hole

    You can one-line this, but I prefer to use git:

    $ git clone --depth 1 https://github.com/pi-hole/pi-hole.git pi-hole
    $ sudo bash pi-hole/automated\ install/basic-install.sh
    

    This will take you through the installer. You’ll have some options to pick from:

    • Interface — I’m using eth0, which means wired Ethernet and not WiFi.
    • DNS — I picked OpenDNS but for most people Google is fine and reliable.
    • Blacklists — Accept the defaults.
    • Protocols — Most people will use IPv4. You’ll know if you use IPv6.
    • IP Address/Gateway – The system does a good job getting the IP of your Pi. The gateway needs to be the IP of your existing router.
    • Web Admin — Yes, we want the web admin.
    • Web Server – You want this if you picked yes for Web Admin.

    Whew. That was a lot, right? And the install takes a bit (don’t panic if it stalls). You’ll get your password for the web admin in this process, so please make a note of it.

    Configure Your Pi-hole

    At this point, you can visit http://pi.hole/admin to get to your admin page. If that doesn’t work, try http://123.45.67.89/admin (changing that to your Pi’s IP) and that will get you in. It does not log you in. You can log in, and you’ll want to because we have to do some extra configuration.

    Also it looks really cool:

    The pi-hole admin screen.

    If you’re lucky enough, your router lets you change the DNS servers. And if that’s the case, just change it to the IP of your Pi-hole. Done and done. However. If you’re like me and use the router that came from your ISP, you may be surprised to find out they don’t trust you in the slightest and you cannot change the DNS settings.

    After you’re done swearing at your ISP, and you’ve decided you don’t feel like shelling out a couple hundred for a router that may or may not work, it’s time to play magic with DHCP.

    DHCP (Dynamic Host Configuration Protocol) is the service that lets your router give all the devices on your local network (LAN) an internal IP address. It also handles all the traffic from your device to the rest of the Internet.

    1. Log in to your router and disable DHCP
    2. Log in to Pi-hole admin and enable DHCP
    3. Make sure the Router Gateway address is the correct IP for your router (if it’s not, nothing will work)

    If you want to switch everyone over right away, reboot your router. If not, just wait for everyone to pick up the new service.

    How Have You Pi’d Your Hole?

    What extra tricks have you spun up? Do you have a perfect blacklist? Do you use it for a VPN as well? Did you figure out how to beat the AT&T modems into submission?

    FYI. Do not reply to this post with “You should use X hardware instead” or even “You need own your own router.” Telling people they’re wrong about choices they made when the choices are perfectly valid is an šŸ† move. Be helpful and lift up. Don’t gatekeep.

    For the people who still have questions, here are some useful posts:

  • Recording Phone Conversations

    Recording Phone Conversations

    If you have an iPhone, it’s annoying hard to record phone conversations these days. In Apple’s defence, that would be because it’sĀ illegal to record someone without their consent in many places and, let’s face it, expecting users to know what the law is everywhere is pretty unlikely.

    Still, I had the case where I needed to record someone’s phone conversation, with their consent, for an article I was working on. And while I thought of a bunch of solutions like Audacity and Skype, I hit a wall when they said they couldĀ only use the phone.

    A screaming monkey.

    Well now it’s on to a hardware solution.

    What You Need

    The basic solution is to connect your phone to an external recording device. This is not exactly simple, as it isn’t ‘just’ plugging your phone into a recorder and pressing go. To do this with an iPhone you need:

    1. an iPhone/headphone adapterĀ – I recommend one that allows you to use a power adapter while you’re on the phone. In case the call goes long.
    2. a male/male mono stereo cable that can convert 3.5mm to 1/4″ – Alternatively you can get a 3.5mm cable and a 1/4″ adapter.
    3. a decent XLR microphoneĀ – I prefer a lav mic (the kind you clip on) but if you want a handheld, go for it.
    4. headphones – You probably have these already. The regular 3.5mm ones.
    5. a recorder like a Zoom H4n or a Tascam DR-40 – It must have atĀ least four input channels. The ones that have ‘two’ channels don’t allow you to plug in the phone or mic.

    There’s no software needed here, because that recorder saves to an SD card, so you’re going to be able to use that directly. I do recommend a power adapter for your recorder, as the XLR mic will be using power from the recorder and you don’t want it crapping out.

    Putting it Together

    The connection method (which you can see on my setup above) is as follows:

    1. headphones in so I can hear everything
    2. lav mic so people can hear me
    3. 1/4″ to 3.5mm adapter
    4. 3.5mm male/male cord
    5. 3.5mm to iPhone adapter

    When someone calls, I answer, make sure they’re okay with being recorded, and off I go.

    Gotchas

    There are a couple things to keep an eye on that will trip you up.

    First of all, you must use a mono cable from your phone to the recorder. Stereo will make a weird buzzing sound.

    Next, I recommend plugging in everything (including the recorder) because the XLR mic uses phantom power.

    MakeĀ sure you set up your recorder to use input 1/2 as your input. By default, mine is set to ‘mic’ which is the two channel microphone on the top of the recorder. Using that won’t do you any good at all.

    And finally? Even if you live in a one-side-consent state (all US states except 12 have this, which includes my current of California so yes, I have to ask for consent first), please please please remember to ask the personĀ before you press record.

  • Review: Do The Twist

    Review: Do The Twist

    When I got ready to go to WordCamp Europe this year, I realized I needed a new adapter. I had one, and it worked, but it also was highly imperfect as it required me to charge everything through my laptop. You know that drill, right?

    Like a lot of road warriors, I travel with about four USB plugs and it’s a mess. It’s always looking for good plugs in a hotel room, and hoping I can charge everything. I used to have a cheap USB hub, but it shorted out. Cheap. I knew what I needed, and it was a charging ‘station.’ But I wanted one that would work ‘universally.’

    The Drama Of Plugs

    I don’t actually remember how I found this. It may have actually been an ad that popped up when I was searching for chargers. I’d been thinking about getting a multi-outlet travel power strip with a couple USB ports. My constant worry with those is the 3-prong US outlet isn’t actually universal here. I’ve been in a lot of nice hotels that don’t have them. Worse, converting from 3-prong to European outlets has, in summer at least, caused a power short.

    Seriously, I blew out the power on my floor in Spain once. Sorry.

    OneAdaptr to Bind Them

    And then I ran into OneAdaptr. At first I was skeptical of the idea. While I had a universal adapter, the sort you can plugin anything into and get anything back out of, this was slightly different.

    If you’ve got a Mac laptop, you’re familiar with the odd way you can change your power adapter to use the 2-prong or grab an extension and use a 3-prong. Backpacking off that concept, the Twist+ adapter lets you plugin your laptop right into the base, while leaving you four USB outlets.

    Example of the twist adapter

    This is the TWIST+ World Charging Station. And I’m a super fan.

    How I Use It

    First, yes, I use it entirely as intended, plugging my laptop and all my devices in. But I actually use it more as a USB hub. Shoving it into my purse, I was able to whip it out at a dinner with friends and plug all our devices in to charge. One of them had a 3-in-1 USB charging cable, and we ended up with 6 devices all plugged in and charging.

    This works well with my ‘style’ as I tend to plugin laptops to charge while I shower and clean up at the end of the day. By the time I’m done, the laptop is charged and goes away, and the hub gets plugged in at my nightstand to charge a Watch, a phone, and an iPad. It could even do another phone without breaking a sweat. And in the absolute worst case? I could plug in my laptop and get two more ports.

    If you just want a USB hub, they (will soon) have a World Charging Station which looks about perfect for a lot of things.

  • Apple Watch Faces

    Apple Watch Faces

    I’ve had my Apple Watch for getting near a year now.

    Time flies I guess.

    I started out using the basic Utility face, with the round clock and simple notifications along the edges. The more I used it, the more I realized I needed different faces for different days. That’s something the Watch lets me do with surprising ease.

    The Workday

    Modular face with schedule first

    What I need to know the most is ‘what do I have scheduled next?’ Meetings of course, but I also put appointments and I schedule ‘to do’ slots in there. I need a half day to fix some code? I’ll do block that out.

    The complications are the date in the upper left, the calendar in the center, and the bottom row are the weather, my activity, and MacID. The last one is a premium app which lets me lock and unlock my laptop from my watch. Since I leave my laptop open on my desk all the time, I find this helpful for security. Pop off the bathroom, lock the laptop. Come back, tap the watch, unlock.

    If you don’t have a watch, they have an iOS app that works too. In fact, the Watch uses the phone app.

    The Weekend

    Classic round watch with few complications

    I like an analog watch face. It’s my default. This one shows me the time and date with the day, the corners are battery and activity. The bottom is weather in detail. If I tap on the date, I go to my calendar, but most weekends I don’t need to worry about it.

    The Traveller

    Modular Face with weather first

    When I travel, I don’t actually need my calendar so much. It’s weird, but since I mostly go to WordCamps or similar conventions, I don’t tend to schedule things past ‘event – 8am to 5pm’ followed by ‘After Party – 6pm to 9pm’ and so on.

    That means what I need for my watch is the weather (I’m often in places for the first time). The bottom row is the time at home (so I don’t call my wife at one in the morning), activity, and my flight status. I almost always fly American these days, so I put that complication in.

    The Apps

    I mentioned MacID already. It’s $3.99 and worth it. I also use Wunderground for my weather, since it has the right kind of alerts. I can see the clouds and the rain and that’s all I want. I use the free version. American Airlines has a free app, and it’s surprisingly good about alerts for gate changes and rescheduled flights. I’m constantly getting updates before gate agents. I also use TripCase since I can track my hotel and event information in it. The bonus there is my wife can check and know where I’m supposed to be, in case she needs to get a hold of me.

    What Else

    I actually have other faces I use. I have a photo I took in Japan that I like to use with the time, and nothing more, when I have a non-stress, non-fuss day. I have a red-text time only face for when I’m in theaters (red light is less ‘glaring’ than others if I should happen to check the time). But the three I listed above are my regular watch faces. All on one watch.

  • Portable Charging

    Portable Charging

    I travel a lot, and as of last WordCamp San Francisco, I realized I needed a way to charge my phone on the go. The issue was that I wasn’t always in a place where I could easily use a plug, and outlets didn’t always work. So I wanted something I could carry with me, plug in while at a restaurant and charge when I wasn’t using it.

    After asking around, I picked up an Anker, which claimed it could charge my iPhone 5 twice. I’ve tested it at 1.75 charges, but that’s usually good enough for me. This year, I got two more types. An Anker from WordCamp NYC and a PowerBank from WordCamp Miami.

    My four chargers, prepping for Tokyo!

    Hands down, the Anker wins. The PowerBanks don’t hold as much of a charge as the Ankers, and they don’t retain their charge quite as well. They’re smaller, so this makes sense to me. Less battery capacity. But the fact that they lose their charge faster means I have to always remember to charge them up. The Anker? Well I didn’t charge the WordCamp NYC one after I got back from NYC, and when I went to charge it up almost 2 months later, it was still half charged. In the same time span, the PowerBanks were dead.

    The downside for all chargers is I have to remember to charge them, which is why they’re pretty useless for my wife who never remembers to charge her phone, and asking her to remember to charge another device won’t work at all. But for me, I toss the two Ankers into my purse and about once a month I charge them up. Or if I’ve used one, I charge it right away. That way, when I get stuck in an airport for god knows how many hours, I’m doing just fine.

  • Replacing a Hard Drive

    Replacing a Hard Drive

    Once in a blue moon I play with hardware. My home laptop has been dropped more times than I care to admit, and it’s finally started to make bad noises. And be slow. As in, I can run one app at a time slow. So I buckled down and put the comic book money into a new hard drive.

    I picked Other World Computing’s Extreme Pro 6G SSD. At 450G.

    The content on my laptop has been around since I was in college and bought my first laptop. Literally. I have every paper I’ve written since high school on here, plus music I wrote, plus videos. It’s a lot. My old HD was 300G and I was always low on space. I also make copious backups to Time Machine. The last four times I got a new computer, I did a Mac transfer. This content, hell, this user account, has been around.

    You bet your ass I kept it again.

    Installing the new HD was easy. Unscrew the back, disconnect the battery, remove the old HD, get the mount screws out, put them and the sticker on the new HD, reconnect everything. screw it’s all back together. Next, though, is the hard part.

    I took my old HD and put it in an external drive case. OWC offers a deal where you get the case and a USB connector for cheap, plus all the tools. Perfect. While I have Time Machine, an over air restore would be 24+ hours. A USB restore, provided the HD doesn’t break, would be about 4. Instead of installing the OS and copying things over, I did a restore from Source.

    Once I got the old HDD in an enclosure, I attached it to your Mac via USB. Then I rebooted the Mac, which took me to OS X Recovery. From there, I clicked on Open Disk Utility and picked the new drive from the left hand pane. There I chose to Erase it and format it to Mac OS Extended (Journaled).

    Once done, I clicked on the Restore tab. I picked the external HD (the old one) as my ‘Source’ and the new one as my ‘Destination.’ Illogically, this is a drag and drop step. Sorry about the photo:

    Terrible photo of what it looks like

    When the data transfer was completed, it was as simple as a restart.

    If you’re skittish, you can put the new HD in the enclosure and copy it that way, booting off USB when you’re done to test it. I’m a little more daring.