Skip to content

Instantly share code, notes, and snippets.

View dive's full-sized avatar
👹

Artem Loenko dive

👹
View GitHub Profile
@dive
dive / firefox_87.b3_64_sample.txt
Created February 28, 2021 18:58
Firefox v87.0b3 (64-bit) on Mac mini M1 Sample – CVDisplayLink unresponsive
Sampling process 33134 for 1 second with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling firefox (pid 33134) every 1 millisecond
Process: firefox [33134]
Path: /Applications/Firefox.app/Contents/MacOS/firefox
Load Address: 0x1046b4000
Identifier: org.mozilla.firefox
Version: 87.0 (8721.2.25)
Code Type: ARM64
Platform: macOS
@dive
dive / neovim_m1_make.log
Created November 27, 2020 13:36
Make log for Neovim (master) on Apple Silicon (M1)
mkdir -p ".deps"
cd .deps && \
cmake -G 'Ninja' \
/Users/dive/Projects/github/neovim/third-party
-- The C compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Volumes/Extended/Archives/Xcode_12.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
@dive
dive / generate_xcworkspace.sh
Created November 8, 2020 21:30
Shell script to generate .xcworkspace with all .xcodeproj in the current directory
#!/usr/bin/env bash
set -eo pipefail
# Prepare the workspace in the TEMP directory
NAME="Temp.xcworkspace"
DATA_FILE="contents.xcworkspacedata"
TEMP_DIR=$(mktemp -d)
mkdir "${TEMP_DIR}/${NAME}"
touch "${TEMP_DIR}/${NAME}/${DATA_FILE}"
@dive
dive / pxed.sh
Created July 19, 2020 15:39
Shell script to scan and open Xcode projects in the current directory
#!/usr/bin/env bash
set -euo pipefail
declare -a PROJECTS=()
function XcodeProjectsInCurrentDirectory() {
TEMP_FILE=$(mktemp)
SEARCH_PATTERN="*${1}*.xcodeproj"
find . -iname "$SEARCH_PATTERN" -type d -print0 | sort -z > "$TEMP_FILE"
while IFS= read -r -d $'\0'; do
@dive
dive / modularisation_consequences_funcorp.md
Last active June 26, 2020 14:23
Links & Additional information for the talk

Катастрофически полезные последствия модуляризации в мире iOS и непрерывной интеграции

Tools

  • Xcodegen - a Swift command line tool for generating your Xcode project;
  • XcodeProj - read, update and write your Xcode projects;
  • XCLogParser - tool to parse xcactivitylog by Spotify;
@dive
dive / org-agenda-bulk-custom-functions.el
Created September 29, 2019 20:08
org-mode: org-agenda-bulk-custom-functions
(defun dive/org-mark-as-reviewed ()
"Mark current selected items as REVIEWED."
(org-set-property "REVIEWED" (org-time-stamp '(16) nil)))
(add-to-list 'org-agenda-bulk-custom-functions
'(?R dive/org-mark-as-reviewed))
@dive
dive / fix-emacs-permissions-catalina.el
Created September 29, 2019 09:55
Fix Emacs permissions on macOS Catalina
;;; package --- Fix permissions for Emacs.app on macOS Catalina
;;; Author: Artem Loenko
;;; Mail-To: <artyom.loenko@mac.com>
;;; Commentary:
;;; Code:
(defconst _default-emacs-app-plist-path "/Applications/Emacs.app/Contents/Info.plist")
(defconst _temp-buffer-name "*fixing Emacs permissions*")
(defconst _temp-buffer (get-buffer-create _temp-buffer-name))
(with-current-buffer _temp-buffer (erase-buffer))
xctest[18838:9855653] The bundle "ios-framework-packagePackageTests.xctest" couldn't be loaded because it is damaged \
or missing necessary resources. Try reinstalling the bundle.
xctest[18838:9855653](dlopen_preflight(./ios-example/ios-framework-package/.build/x86_64-apple-macosx10.10/debug/ios-framework-packagePackageTests.xctest/Contents/MacOS/ios-framework-packagePackageTests):
**Library not loaded: @rpath/libswiftUIKit.dylib**
...
Reason: no suitable image found. Did find:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftUIKit.dylib: mach-o,
**but built for simulator (not macOS))**
swift test --verbose \
-Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" \
-Xswiftc "-target" -Xswiftc "x86_64-apple-ios12.1-simulator" \
-Xswiftc "-lswiftUIKit"
$ otool -l .build/debug/ios_framework_package.build/ios_framework_package.swift.o
...
Load command 6
cmd LC_LINKER_OPTION
cmdsize 32
count 2
string #1 -framework
string #2 UIKit
...