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
class CentralMenuButton: UIButton { | |
var label: UILabel? | |
var labelText: String! | |
var labelColor: UIColor! | |
var labelFont: UIFont! | |
var labelAlignment: NSTextAlignment! | |
override init(frame: CGRect) { |
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
func flashScreen() { | |
let inDuration: CGDisplayFadeInterval = 0.0 | |
let outDuration: CGDisplayFadeInterval = 1.0 | |
let color = NSColor.white | |
var fadeToken: CGDisplayFadeReservationToken = 0 | |
let colorToUse = color.usingColorSpaceName(NSColorSpaceName.calibratedRGB)! | |
let err = CGAcquireDisplayFadeReservation(inDuration + outDuration, &fadeToken) | |
if err != CGError.success { |
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
Last login: Fri May 10 14:02:39 on ttys000 | |
FusionDriveiMac:~ admin$ /usr/sbin/diskutil cs list -plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CoreStorageLogicalVolumeGroups</key> | |
<array> | |
<dict> | |
<key>CoreStorageLogicalVolumeFamilies</key> |
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
2019/04/12 14:08:06:389 macOS Utilities-v2.65-b2 | |
2019/04/12 14:08:06:389 | |
2019/04/12 14:08:06:389 | |
---------------------------LOGGER INITIALIZED--------------------------- | |
2019/04/12 14:08:06:389 | |
2019/04/12 14:08:06:389 Library folder does not exist at '/Users/admin/Library/Application Support/ER2/' | |
2019/04/12 14:08:06:389 Creating folder at path '/Users/admin/Library/Application Support/ER2/' | |
2019/04/12 14:08:06:390 Library folder exists at '/Users/admin/Library/Application Support/ER2/' | |
2019/04/12 14:08:06:390 Property list does not exist at '/Users/admin/Library/Application Support/ER2/com.er2.applications.plist' | |
2019/04/12 14:08:06:390 Copying property list from bundle |
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
require 'net/https' | |
require 'uri' | |
class WebArchiver | |
def self.archive(url) | |
url = URI.parse("https://web.archive.org/save/#{url}") | |
req = Net::HTTP::Get.new(url.to_s) | |
res = Net::HTTP.start(url.host, url.port, :use_ssl => true) {|http| | |
http.request(req) |
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
require 'json' | |
require 'net/http' | |
require 'uri' | |
require 'logger' | |
logger = Logger.new(STDOUT) | |
base_url = 'http://10.0.2.7:3001' | |
serial = `sudo dmidecode -t 1 | grep Serial | sed 's/.*: //g'`.strip! |
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
require 'json' | |
require 'net/http' | |
require 'uri' | |
require 'logger' | |
logger = Logger.new(STDOUT) | |
#get machine serial number | |
serial = `sudo dmidecode -t 1 | grep Serial | sed 's/.*: //g'`.strip! | |
base_url = 'http://10.0.2.7:3001' |
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
044d526abc3b038b5c298e76994f9aca88bfdf575a8e1bb99b640b069f05abaeda7c2a92f0f8176cdedd7a94b9ff7fa9a8071898dafb62bb59c78888ffa005243f |