VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated
#pragma mark - Article: https://sergey-nes.medium.com/enhance-your-swiftui-live-preview-workflow-with-previewlogger-6c768e7362a5 | |
import SwiftUI | |
#pragma mark - ContentView | |
struct ContentView: View { | |
@EnvironmentObject var previewLogger: PreviewLogger | |
var body: some View { |
VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated
#!/bin/zsh | |
# Shell Script to create all relevant icons from an high resolution artwork | |
if [ "x$1" != "x" -a -f "$1" ] ; then | |
INPUT=$1 | |
else | |
INPUT="Artwork.png" | |
fi | |
if [ ! -f "$INPUT" ]; then |
########### | |
# general # | |
########### | |
# Replace C-b prefix with Alt+Space (so it won't clash with vim) | |
unbind C-b | |
set-option -g prefix M-Space | |
set-window-option -g mode-keys vi | |
set-option -g default-shell /usr/local/bin/fish |
#!/usr/bin/swift | |
import Foundation | |
class Bash { | |
static var debugEnabled = false | |
// save command search time | |
static var commandCache: [String: String] = [:] | |
@discardableResult |
import Cocoa | |
#if canImport(SwiftUI) && DEBUG | |
import SwiftUI | |
struct NSViewControllerPreview<ViewController: NSViewController>: NSViewControllerRepresentable { | |
let viewController: ViewController | |
init(_ builder: @escaping () -> ViewController) { | |
viewController = builder() |
It often be helpful to be able to debug memory usage in Swift on Linux, for example to debug memory leaks.
This is a quick overview of how to generate a report of memory usage for your Swift app. This guide will only show you how to generate the report, not how to analyze it, it might be written up in a blog post later.
First we need to install a tool called Valgrind, which is used to trace memory usage.