Powerball Simulator

The LA Times put out a really fun Powerball Simulator.

The odds of winning the Powerball jackpot are 1 in 292,201,338. But someone has to win, right? We decided to put that idea to the test.

This game starts with $100 to play against multiple lottery drawings. Pick your numbers and watch the money disappear. Based on the odds, you’re likely to hit numbers that pay out smaller prizes.

So, I played some of my favorite numbers (backwards, because the powerball has to be between 1 and 26). I didn’t do so well, even after throwing $10,100 at the problem:

You’ve played the lottery 5,516 times over about 53 years and spent $11,032, but won $932. You’re in the hole $10,100. So why not throw some more money at that problem?

(Side note: people have actually won playing those numbers)

This site only has you use your “favorite” set of numbers once per drawing - it doesn’t take show you the changes in odds if you were to do 10 quick-picks per lotto drawing, for example.

MagSpoof: Emulating magnetic stripes on credit cards

MagSpoof - “wireless” credit card/magstripe spoofer GIF showing magnetic stripe on credit card Gif by Samy Kamkar

The MagSpoof is a very cool little device that can emulate a credit card swipe by manipulating an electromagnetic field near a card reader - because of how card readers read cards, the MagSpoof can do this wirelessly on non-wireless card readers.

While the device is cool, the most interesting part of the article was the explanation of how magnetic stripes on credit cards work, and the fact that you can see the data by coating the stripe with a little black iron oxide (as seen in the gif above).

Automatically Mark Prompt Lines

Thanks to a tweet by John Siracusa, I noticed something I’ve had enabled on my computer for months and never noticed (but now can’t unsee): automatically marked prompt lines in Terminal:

Screenshot of a marked prompt line

Notice the square brackets around the executed command on the first line?

[jared@Jared-MBP:~$ ll A*                   ]

According to this answer on an Ask Different question, every time you press return on the keyboard, the line is ‘marked’, and you can use cmd+up and cmd+down to jump back and forth between marked lines.

Now that this has been pointed out to me, I’ve started playing with it, and it seems like a really nice feature I’m going to get used to really quick.

Apple Watch Magnetic Charging Cable

My brother pointed out to me that Windows detects the Apple Watch charging cable when you plug it in. Of course, I was curious, so I used USBView to take a look at the device. Apple apparently has a PCI Vendor ID of [0x05AC] (Apple Computer), which is pretty cool!

Complete output from USBView:

Device Descriptor:
bcdUSB:             0x0200
bDeviceClass:         0x00
bDeviceSubClass:      0x00
bDeviceProtocol:      0x00
bMaxPacketSize0:      0x40 (64)
idVendor:           0x05AC (Apple Computer)
idProduct:          0x1392
bcdDevice:          0x0200
iManufacturer:        0x01
0x0409: "Apple Inc."
iProduct:             0x02
0x0409: "Apple Watch Magnetic Charging Cable"
iSerialNumber:        0x03
0x0409: "DLC5357021XGTCMAH"
bNumConfigurations:   0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed:     Full
Device Address:       0x06
Open Pipes:              1

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x32

Configuration Descriptor:
wTotalLength:       0x0022
bNumInterfaces:       0x01
bConfigurationValue:  0x01
iConfiguration:       0x00
bmAttributes:         0x80 (Bus Powered )
MaxPower:             0xFA (500 Ma)

Interface Descriptor:
bInterfaceNumber:     0x00
bAlternateSetting:    0x00
bNumEndpoints:        0x01
bInterfaceClass:      0x03 (HID)
bInterfaceSubClass:   0x00
bInterfaceProtocol:   0x00
iInterface:           0x05
0x0409: "HID Interface"

HID Descriptor:
bcdHID:             0x0111
bCountryCode:         0x00
bNumDescriptors:      0x01
bDescriptorType:      0x22
wDescriptorLength:  0x0021

Endpoint Descriptor:
bEndpointAddress:     0x81  IN
Transfer Type:   Interrupt
wMaxPacketSize:     0x0040 (64)
bInterval:            0x32

Why is light so fast?

Light travels at around 300,000 km per second. Why not faster? Why not slower?

Aeon.co has an excellent article on the science behind light. Gives you a lot to think about.

There’s something very intriguing about how tightly constructed the laws of our own Universe appear to be.