sudo apt install qemu-system-x86
sudo apt install libsdl2-dev
qemu-img create -f qcow2 test.qcow2 16G
qemu-system-x86_64 -enable-kvm -m 2048 -boot d
-nic user,model=virtio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// missing from JS stdlib | |
// return an array of numbers starting at `start`, not reaching `end`, incrementing by `step`. | |
export function range(start: number, end: number, step: number = 1): number[] { | |
return [...Array(Math.ceil((end - start) / step)).keys()].map(i => i * step + start); | |
} | |
// return the average of an array of numbers. | |
export function average(array: number[]): number { | |
return array.reduce((sum, n) => sum + n) / array.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "polygon.h" | |
class Point { | |
public: | |
double x; | |
double y; | |
Point(void) : x(0.0), y(0.0) {} | |
Point(double x, double y) : x(x), y(y) {} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
class ProgressBar: | |
def __init__(self, title: str, width: int): | |
self.title = title | |
self.width = width | |
self.amount = 0 | |
self.update(0) | |
def update(self, amount: int) -> None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import array | |
import itertools | |
import struct | |
import sys | |
from typing import Iterator, List | |
__title__ = "kindasnappy" |
- not since 2000, some dell "latitude"?
- looked at thinkpad x1
- terrible reviews
- ugly eraser is still there
- for a "linux laptop", didn't seem to care much about linux
- as a hardware mfctr, you can't ask me to go download an install cd and dig up custom drivers off random websites for you. that's your responsibility.
- 2 things i wanted PC laptops to have fixed since 2000:
- sleep works (you can close the lid) without hard-crashing or requiring a power-off
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
; the "monitor ROM" of an apple 1 fit in one page (256 bytes). | |
; | |
; this is my attempt to take the disassembled code, give names to the | |
; variables and routines, and try to document how it worked. | |
; | |
; | |
; an apple 1 had 8KB of RAM (more, if you hacked on the motherboard), and a | |
; peripheral chip that drove the keyboard and video. the video was run by a | |
; side processor that could treat the display as an append-only terminal that |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* zbase64 converts an array of integers to a string, and back. | |
* it assumes: | |
* - no integer will be bigger than about 2**24 | |
* - most will be close to zero, small positive or negative numbers | |
* - the strings may be copy/pasted, or have poor (or zero) unicode support | |
* | |
* strategy: | |
* - zig-zag encode to turn small negative numbers into small positive | |
* numbers |
My thoughts after watching the entire 12 minutes of "Child's Play" by Drake.
His (ex) girlfriend looks immaculate. He doesn't deserve her. He comes across as an asshole in his own video -- why did he write this? Does he think we'll think he's cool if he's cheating on his anniversary? He left his phone unlocked on the table while he left? Does that mean he was playing with his phone during their anniversary dinner?
(Rus thinks the fact that she's much too good for him is the point, and that he's bragging about how terrible he is.)
Who the fuck takes their girl to Cheesecake Factory for their anniversary?
Is he making fun of people who are so poor that they go to Cheesecake Factory? Just because he's a millionaire?
NewerOlder