iappp
iappp
zds
5 posts
useful stuff to know if you’re into tech or science or stuff like that. also a blog about the project(s) I’m working on that will take over the world 😂😂😂
Don't wanna be here? Send us removal request.
iappp · 7 years ago
Text
How to install macOS High Sierra in VMWare on Windows 10
I can only guarantee this working as of the time that this was posted. It's a complete hack, but it works. I also was able to do the same thing on GNU/Linux (Ubuntu 18.04) with the exact same method.
The biggest downside is that there is no way to get macOS on VMWare (or Virtualbox) to use multiple monitors.
This can be done without having to trust any sketchy, malware-laden torrents. You can use a genuine macOS image from Apple and a genuine VMWare Player.
1. Download genuine MacOS from the App Store on a real Mac
Borrow a friend's MacBook for this. It's just the easiest way.
Go in the App Store, search for "MacOS", and hit download. It will save to "/Applications/Install macOS High Sierra.app". The installer will automatically open as if you are updating the computer you're using--just ⌘Q out of it.
Caveat: I tried to do this step in my VM install of macOS, and was only able to get a ~17MB "Install macOS High Sierra.app" from the App Store. It probably was because there was very little space left on the drive, so make sure the Mac you're using has at least 10GB of free storage space. The image from the App Store for High Sierra is close to 6GB.
2. Create a bootable ISO on the Mac
Follow Step 1 of these instructions from HowToGeek. If you're reading this in the future, and using a future version of macOS, be sure to change "/Applications/Install\ macOS\ High\ Sierra.app" to the actual path of your new installation. (Don't just blindly copy and paste the terminal commands here.)
You can't do this on Linux or Windows. Making the bootable ISO depends on some proprietary tools from Apple that come with the OS. If you don't have hdiutil or asr on the Mac you're using, make sure to install XCode Command Line Tools from the App Store.
If you want to skip steps 1 and 2 here, you can just download the High Sierra image I made. (I would prefer you actually go through the work above, though, rather than trusting binaries from random blogs.)
3. On Windows (or Linux), install VMWare Player
It's free (as in beer) for personal, non-commercial use. The one I used was the current version at the time of writing, VMWare Workstation Player 14.
4. Install the VMWare unlocker hack
It's on Github and open source. Normally VMWare won't run macOS on non-Apple devices, as that violates Apple's EULA. Follow the instructions on there. This also installs the Guest Additions so that you can open macOS at full screen resolutions.
Without this hack, none of this would work.
5. Go through the tedious steps of configuring the VM
You can handle it from there.
If the display resolution refuses to change to your actual high resolution, try:
$ sudo defaults delete /Library/Preferences/com.apple.windowserver.plist DisplayResolutionEnabled
and restart the VM. The HiDPI setting will be gone.
6. You're in! You're officially in macOS! 🎉🎉🎉🙌
0 notes
iappp · 7 years ago
Text
Generating “valid” DEA numbers
I found our recently that (I don’t know about now (I hope not now), but probably a long time ago) many healthcare practitioners validated DEA numbers by mentally calculating a checksum from adding together some of the digits, similar to the Luhn algorithm:
https://en.m.wikipedia.org/wiki/DEA_number
Basically, you add the 2nd, 4th, and 6th numbers, double it, and then add to that the 1st, 3rd, and 5th numbers. The rightmost digit (the modulo 10) of that total sum must equal the rightmost digit of the whole DEA number.
Very simple. How about doing it the other way around? Well the easiest way would be to randomly generate the base numbers and then after the fact compute the last number (the checksum). That’s what my little Ruby script does:
https://github.com/iappp/dea-number-generator
Run the script to generate a random DEA number that will pass this verification method.
DEA numbers are issued to various healthcare workers, scientists, or manufacturers to identify their permission to deal with controlled substances. Some people (like scientific researchers) are even authorized to handle Schedule I substances—like LSD—completely legally. Serious stuff.
Obviously in this day and age, no one is checking DEA numbers this way. I’m sure the DEA offers an API to verify the validity of these numbers. But I guess it’s a quick algorithmic way to filter out the amateurish fakes before having to hit the DEA unnecessarily.
0 notes
iappp · 7 years ago
Text
Top N Keyboard Keys You’re Probably Using the Wrong Finger to Press
Or at least these were the keys that I personally was typing with the incorrect keys until I started paying more attention to the effiency of my keystrokes—the distance moved by the finger and the subjective hand tension required for a finger to actuate a keystroke. I looked at the overall amount of hand contortion I was doing to press each key and changed the movements that regularly caused me the most sensation of tension. These little changes can actually dramatically improve your typing speed. Not that typing speed typically is ever the bottleneck for writing prose or writing code (I wish). The real benefit is having less strain after doing a full day's work of some type of work where the main physical activity is typing.
Hand anatomy reference
First, we need a shared vocabulary for the anatomical parts of the hand:
And importantly note the common English names for the fingers that I will be using here: thumb, index finger, middle finger, ring finger, pinky.
1. ⌃ aka Ctrl aka Control—palm bone (metacarpal) of your pinky finger
The secret is that you never use any finger to press this key. It is used so often in keyboard shortcuts (cough Emacs cough) despite being awkwardly positioned in the corner(ish) of standard keyboard layouts. Most people seem to use their pinky or ring finger to press this key. That can sometimes involve moving your entire hand along with it (and doing this movement hundreds of times per hour 🤮).
You just need to push the corner of your {left, right} palm downward to press the {left, right} Ctrl key. It will take a little practice to do this accurately, but you will be grateful once you feel the reduced strain.
Depending on your keyboard, you can use the same idea for the Meta or Alt or Option ⌥ key. On a standard Mac keyboard, I use the corner of my left palm for ⌃ key and the corner of my right palm for the ⌥ key.
2. , (comma)—right middle finger
3. ⇧ aka Shift—knuckle of pinky finger (joint of metacarpal of pinky finger)
Like this but pressing Shift instead of Ctrl:
4. Delete aka Backspace—right pinky
5. x—left middle finger
6. y—right index finger
7. r—left index finger
8. 4 or $—left middle finger
9. 1 or !—left pinky finger
Why these were chosen
The goal is to minimize stress and strain. The best way to do this is to maximize the amount of time your hands are in a neutral position (i.e., fingers on the homerow). Minimize the total expected distance that your hands will have to move to press all the keys.
Ideally, your hands never leave the resting home row position, ever.
B-but my muscle memory!
True, you're going to be slower at typing while you're practicing these new keys. And you're going to sacrifice your now-effortless and deeply ingrained muscle memory.
But it's still worth it. If you've ever typed enough that your hands got sore for a little bit, you know the reason for doing this. You could have typed for much longer before reaching that point of soreness.
0 notes
iappp · 7 years ago
Link
Tensorflow has a C API (and thus any language with a C FFI can have bindings to it). Nevertheless, I think this represents a step in the right direction. The guarantees provided by Haskell’s type system can help counteract some of the nonlinearity of neural networks. In production, e.g., when neural networks are potentially life-or-death decisions, I think we can appreciate why such guarantees may be important.
0 notes
iappp · 7 years ago
Text
Using I’m Feeling Lucky as a custom search engine in your browser
The only existing solution for this, which involves using a custom URL like https://www.google.com/search?source=hp&q=%s&oq=%s&btnI=1, doesn't work about 20% of the time. Some search queries send you to the search results page—presumably when the confidence of the top result's relevance is low, but who knows what's going on (it's a black box). Only an actual click of I'm Feeling Lucky will consistently trigger a 302 redirect to the first result. So that's what I did.
The workaround is to install my userscript (install Tampermonkey or Greasemonkey) that simulates a click on the Google home page and then to add a special URL as a custom search engine.
https://github.com/iappp/ifl
0 notes