Showing posts with label mac. Show all posts
Showing posts with label mac. Show all posts

Friday, March 01, 2024

MARCHintosh Day #1: How Much Memory?

I should have done a better job keeping track of the memory that came installed in the Power Macs I recently bought.

Mac #1 is a 7100/66, it has four SIMM slots.

Mac #2 is a 6214CD with two SIMM slots.

I also bought 4 32MB SIMMs I figured I would split between the two new Macs.

So Mac #1 now has 64 MB plus two 8 MB that were leftovers, for a total of 80 MB. There must have been two SIMMs that were leftover, size unknown.

And Mac #2 now has 64 MB total. The sizes of its two leftovers are also unknown.

Let's see if we can figure out the size of those four SIMMs.

Or six. You see, there were a bunch of SIMMs in a shoe box, also of unknown size. I'd swear there were three, so maybe the 7100 only had one leftover? Who knows.

Here's the log of my analysis:

SIMM #How many?Total inc one 32 MB simmSize of this SIMM
1240,960 KB8 MB
2240,960 KB8 MB
3149,152 KB16 MB
4149,152 KB16 MB

So the result is that I should have measured all of the memory before I re-cabled the 7100, which is a huge pain in the butt. But replacing 16 MB with 32 MB will give me a total of 96 MB in that system, which will be well worth the effort.

And I'd say MARCHintosh Day #1 was a success!

Tuesday, March 22, 2022

Emacs Font Size

 Emacs (on Mac OS) font size kept changing on me. I finally figured out what was causing it.

CTRL-OPT + two-finger swipe up/down

And the status line, where it shows the file type, actually shows +1, +2, etc when the font size increases by one or two steps, etc.

This was driving me crazy. I'm going to blame this, like everything else, on the enormous trackpad.

Monday, February 22, 2021

Play my slides, please!

Did you ever need to take notes while you watch your slides play, but you don't want to switch back and forth between your Keynote and your text editor? Here you go... Save this to your Mac as main.swift - no other name will work, then run it in a terminal like so:

$ swift main.swift


import Cocoa

var pid = pid_t(-1)

let bid = "com.apple.iWork.Keynote"

for x in NSWorkspace.shared.runningApplications {
    if x.bundleIdentifier == bid {
        pid = x.processIdentifier
        break
    }
}

guard let keynote = NSRunningApplication(processIdentifier: pid) else {
    print("Can't find Keynote")
    exit(-1)
}

let src = CGEventSource(stateID: CGEventSourceStateID.hidSystemState)

let key: UInt16 = 0x79

guard let keydown = CGEvent(keyboardEventSource: src, virtualKey: key, keyDown: true) else {
    fatalError("Can't get keydown")
}

guard let keyup = CGEvent(keyboardEventSource: src, virtualKey: key, keyDown: false) else {
    fatalError("Can't get keydown")
}

while (true) {
    keydown.postToPid(pid)
    usleep(10_000)
    keyup.postToPid(pid)
    usleep(15_000_000)
}

Friday, March 24, 2017

Mac + Virtualbox/Linux ALT=CMD

By default it seems that when you run Linux in Virtualbox on a Mac, ALT will be mapped to the OPTION key and SUPER will be mapped to CMD.

It's much more natural to swap these, i.e. to map ALT to CMD.

And here's how you do it:

Create ~/.Xmodmap containing...

clear mod1
clear mod4

keycode 133 = Alt_L NoSymbol Alt_L
keycode 64 = Super_L NoSymbol Super_L

add mod1 = Alt_L
add mod4 = Super_L


And then

$ xmodmap ~/.Xmodmap

Enjoy!

Friday, July 01, 2011

Fun with Eclipse on Mac OS: the command/option saga

When I tried to run Eclipse on my Macbook Pro the other day, I discovered that the command and option keys were reversed. If I tried to Paste with cmd-V, I'd get some funny character, but if I typed opt-V, it would paste. Instead of quitting, cmd-Q would insert this "œ" character, which is supposed to be input via opt-Q, which instead would quit me from Eclipse. Yeah, loads of fun.

I googled all around and found nothing, nothing at all, about this. The only other thing I could think of was to submit a bug (this one) and hope that someone could point me to some page about a gotcha... or whatever.

Well the plot thickens. Turns out that if I create a new user account on the Mac, that user doesn't have the same problem. So at least I know it's not even something about my system, but rather about my normal user account. So if I can't figure out, the worst case solution is I have to switch users to run Eclipse. Maybe I'd just switch to a new user account instead and move all my stuff to it.

But before I do all that, I'll see if I can figure out what it is about my account that's causing this. If I find any answers, I'll be posting them here.

Update: I tried a bunch of things -- moving all of the Preferences out of ~/Library, moving .* out of ~, moving Application Support files... I finally got fed up and just created a new account. Oh what fun this will be! :/

Wednesday, June 29, 2011

Kensington Universal Multi-Display Adapter

This is kind a note-to-self, but maybe it will help somebody else some day.

I've got a Kensington Universal Multi-Display Adapter hooked up to my Mac Mini, so I can have two displays. Works really great, but... whenever the power goes out and the system shuts down, I'll start it back up and that monitor is dark, dead, like a paperweight.

Want to know what I did to fix it? It's really complicated. Unplug the adapter from the system and plug it back in. Yes, that's all. Only took me an hour this time to think of that. Maybe next time I'll google it and end up back here and ::facepalm:: suffer for only a few minutes.

You're welcome, self!!