The docs on https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta#4239539 are sparse and incomplete and don't tell you at all how to set this up. Lets trial and error our way through this.
This file contains hidden or 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
| From 706489688523d4af9ce4422137e4bfdb2f70aab9 Mon Sep 17 00:00:00 2001 | |
| From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <[email protected]> | |
| Date: Sat, 5 Aug 2023 20:54:12 +0000 | |
| Subject: [PATCH] Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 6.5-rc1 | |
| Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-36 on Arch Linux | |
| On Linux 6.5, due to commit 2d47c6956ab3 ("ubsan: Tighten UBSAN_BOUNDS | |
| on GCC"), flexible trailing arrays declared like `whatever_t foo[1];` | |
| will generate warnings when CONFIG_UBSAN & co. is enabled, such as: |
This file contains hidden or 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 bash | |
| set -e | |
| VOLUME_PATH=/Volumes/installer | |
| while getopts ":d:h" opts; do | |
| case $opts in | |
| d) | |
| VOLUME_PATH=$OPTARG | |
| ;; |
"JUST BECAUSE YOU'RE USING SWIFT DOESN'T MEAN YOUR QUESTION IS ABOUT SWIFT"
Ask your question and then be patient. Tell us what you want to happen, what is actually happening, and include any error messages you find:
- Provide a scenario. "I am trying to do X, I do so by calling APIs W and Y, but Z happens instead. I see the following error messages:..."
- Focus on the goal. Ask about what you're trying to achieve (the big story) rather than the specific technical detail that you believe is holding you back.
- Don't solicit help. Don't say, "Does anyone here know about (for example) Protocol Extensions". Just ask your question.
- Do your homework. Search the web before asking in-channel.
- Be courteous Don't just paste Stack Overflow questions in-channel.
- Remember the topic Refer questions about third party libraries to their developers.
This file contains hidden or 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
| // NSScanner+Swift.swift | |
| // A set of Swift-idiomatic methods for NSScanner | |
| // | |
| // (c) 2015 Nate Cook, licensed under the MIT license | |
| import Foundation | |
| extension NSScanner { | |
| // MARK: Strings |
This file contains hidden or 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
| // Usage | |
| let argv = CStringArray(["ls", "/"]) | |
| posix_spawnp(nil, argv.pointers[0], nil, nil, argv.pointers, nil) | |
| // Is this really the best way to extend the lifetime of C-style strings? The lifetime | |
| // of those passed to the String.withCString closure are only guaranteed valid during | |
| // that call. Tried cheating this by returning the same C string from the closure but it | |
| // gets dealloc'd almost immediately after the closure returns. This isn't terrible when | |
| // dealing with a small number of constant C strings since you can nest closures. But |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains hidden or 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/expect -f | |
| # | |
| # VIPAccess.exp | |
| # | |
| # Command-line emulation of Symantec's VIP Access software token. | |
| # Usage: | |
| # ./VIPAccess.exp [v] | |
| # If the "v" argument (or any argument) is specified, verbose output | |
| # will be produced on stderr. The OTP value will be output on stdout. | |
| # |
This file contains hidden or 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
| static Boolean PSPDFCaseInsensitiveEqualCallback(const void *a, const void *b) { | |
| id objA = (__bridge id)a, objB = (__bridge id)b; | |
| Boolean ret = FALSE; | |
| if ([objA isKindOfClass:NSString.class] && [objB isKindOfClass:NSString.class]) { | |
| ret = ([objA compare:objB options:NSCaseInsensitiveSearch|NSLiteralSearch] == NSOrderedSame); | |
| }else { | |
| ret = [objA isEqual:objB]; | |
| } | |
| return ret; | |
| } |
This file contains hidden or 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
| Copyright (C) 2012 Yoshimasa Niwa | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to | |
| permit persons to whom the Software is furnished to do so, subject to | |
| the following conditions: |
NewerOlder