Miscellaneous How To

How to run MacOS on other platforms

It is possible to run MacOS in a visualized environment on any host that can run VirtualBox. The easiest way to do this is with Vagrant.
Disclaimer: Apple's MacOS EULA is a bit draconian on how you can get and where you can run MacOS. In US short term execution for purely integration purposes on other platforms, after you bought Mac hardware, may be protected by DMCA section 1201

To get a working MacOS High Sierra 10.13 VM get Vagrant, save the following into 'Vagrantfile' and run
vagrant up
from the folder where you created Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "thealanberman/macos-10.13.4"
# Folder sharing available via rsync.
# Security Update 2018-001 installed.
# SIP disabled.
# Removed most default macOS Apps to save on space.
config.vm.box_version = "201805.23.0"
config.vm.synced_folder ".", "/vagrant", type: "rsync"
config.vm.provider "virtualbox" do |vb|
# Don't check for Guest Additions on macOS
vb.name = "macOS 10.13 High Sierra minimal VM"
vb.check_guest_additions = false
vb.customize ["modifyvm", :id, "--vram", 128]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["modifyvm", :id, "--accelerate3d", "on", "--accelerate2dvideo", "on"]
vb.customize ["modifyvm", :id, "--audio", "pulse", "--audiocontroller", "hda", "--audioout", "on", "--audioin", "on"] # YMMV
vb.customize ["setextradata", :id, "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct","Iloveapple"]
vb.customize ["setextradata", :id, "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct","iMac11,3"]
vb.customize ["setextradata", :id, "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion","1.0"]
vb.customize ["setextradata", :id, "VBoxInternal/Devices/smc/0/Config/DeviceKey","ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"]
vb.customize ["setextradata", :id, "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC","1"]
# 1280x720 | 1920x1080 | 2560x1440 | 2048x1080 | 3840x2160 | 5120x2880 | 1280x800 | 1280x1024 |1600x900 | 1440x900
# https://www.virtualbox.org/manual/ch03.html#efividmode
vb.customize ["setextradata", :id, "VBoxInternal2/EfiGraphicsResolution","1920x1080"]
# turn off boot messages
vb.customize ["setextradata", :id, "VBoxInternal2/EfiBootArgs"," "]
# Customize the amount of memory on the VM:
vb.memory = "4096"
# Display the VirtualBox GUI when booting the machine
# vb.gui = true

Change Icedtea java plugin permission for a site

If you have accepted a site certificate and need to revoke it run
Then go to Certificates, select Trusted Certificates, pick the one you want to remove, click remove, ok
Keep in mind you might have two different certificates for one site - one certificate for the https, the other for the applet signature

How to make a real system look like a mock up

Say you want to do a screen cast and all you have is a functional system, but you do not want to expose any potentially sensitive information. Your solution is to use firefox with a greasemonkey script that replaces questionable content on a displayed page with faked data.

How to get a high resolution logo of any company

Type the following into google: company name filetype:pdf site:companysite.com

Pick several PDF. Open and look for the logos. Zoom in close to check if they are vector and thus don't deteriorate when closely zoomed Make a snapshot of the logo blown up to the take your full screen. You could get it bigger than the screen size if you zoom in more, make multiple snapshots of each segment and then stich back together.

In photoshop crop it to contain the logo only. If you need to make it on a transparent background do a color range selection (works fine at the fuzziness of 40). Delete the selected region. Remove the background layer visibility so it does not show up through the region you just deleted. Remove white matte. Save as PNG to preserve transparency.

How to rasterize vector changes in pdf aka embed the markup editing of pdf

file -> save as, select png then file-create pdf-from multiple files. browse, select the png files and create a pdf
or you could resort to a low tech solution - just print the file and scan it back

@HowTo @Design