Skip to content

Instantly share code, notes, and snippets.

@Frizlab
Frizlab / gpg-pass-from-env.sh
Created February 23, 2024 23:49
gpg-pass-from-*
#!/bin/bash
set -euo pipefail
exec gpg --pinentry-mode=loopback --passphrase="$FRZ_GPG_PASS" "$@"
@Frizlab
Frizlab / Bundle+Utils.swift
Created September 3, 2022 20:52
Workaround a Bundle Bug
public extension Bundle {
/**
Workaround a bug where the ``Bundle`` class is not aware of all of its bundles until it has encountered them.
The case happens for instance when trying to load a storyboard from a reference in a storyboard that is in another module.
First, an aside about module bundles.
A module bundle is named `<#modulename#>_<#targetname#>` and have the identifier `<#modulename#>-<#targetname#>-resources`.
The bundle folder name is the bundle name with the extension “`bundle`”.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0. Program arguments: /Volumes/Common/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c /Users/frizlab/Documents/Projects/happnOffice/officectl/Sources/OfficeKit/Config/GlobalConfig.swift /Users/frizlab/Documents/Projects/happnOffice/officectl/Sources/OfficeKit/Config/OfficeKitConfig.swift /Users/frizlab/Documents/Projects/happnOffice/officectl/Sources/OfficeKit/Config/OfficeKitServiceProvider.swift /Users/frizlab/Documents/Projects/happnOffice/officectl/Sources/OfficeKit/Core/AbstractClasses/Action.swift /Users/frizlab/Documents/Projects/happnOffice/officectl/Sources/OfficeKit/Core/AsyncSupport/Action+Async.swift /Users/frizlab/Documents/Projects/happnOffice/officectl/Sources/OfficeKit/Core/AsyncSupport/FutureUtils.swift /Users/frizlab/Documents/Projects/happnOffice/officectl/Sources/OfficeKit/Core/Erasure
@Frizlab
Frizlab / exportOptionsAdHoc.plist
Created January 24, 2022 00:03 — forked from cocoaNib/exportOptionsAdHoc.plist
Xcode build with exportOptionsPlist
<?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>method</key>
<string>ad-hoc</string>
</dict>
</plist>
@Frizlab
Frizlab / electron_apps.sh
Created July 19, 2020 14:31
Find electron Apps on your system
# Find electron Apps on your system
mdfind 'kMDItemContentType = "com.apple.application-bundle"' | while read a; do has=`ls "$a"/Contents/Frameworks/Electron\ Framework.framework >/dev/null 2>&1 && echo true || echo false`; test "$has" = true && echo $a; done
@Frizlab
Frizlab / brew config.txt
Last active February 16, 2019 19:40
Some brew info
HOMEBREW_VERSION: 2.0.1-79-gcadffcf
ORIGIN: https://github.com/Homebrew/brew
HEAD: cadffcf2a0ed77696e839c38f20287d5ee6d8b3a
Last commit: 6 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: f3f3777caad040a5086ceef619519cccdd7c4437
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /Users/frizlab/usr/homebrew
HOMEBREW_REPOSITORY: /Users/frizlab/usr/homebrew
HOMEBREW_CELLAR: /Users/frizlab/usr/homebrew/Cellar
@Frizlab
Frizlab / brew_config.txt
Created February 11, 2019 23:10
brew config
HOMEBREW_VERSION: 2.0.1-23-g1fd8b38
ORIGIN: https://github.com/Homebrew/brew
HEAD: 1fd8b387c65ca54ae37944ca82e8675360c69c2c
Last commit: 9 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: e3d13566d206d767d6e09d6aad7c6484be553e71
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /Users/frizlab/usr/homebrew
HOMEBREW_REPOSITORY: /Users/frizlab/usr/homebrew
HOMEBREW_CELLAR: /Users/frizlab/usr/homebrew/Cellar
@Frizlab
Frizlab / brew_doctor.txt
Created February 11, 2019 23:09
brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: The filesystem on / appears to be case-sensitive.
The default macOS filesystem is case-insensitive. Please report any apparent problems.
Warning: Your Homebrew's prefix is not /usr/local.
Some of Homebrew's bottles (binary packages) can only be used with the default
prefix (/usr/local).
@Frizlab
Frizlab / logs.txt
Created September 26, 2018 21:08
Swift compilation failure
FAIL: Swift(linux-x86_64) :: Index/Store/output-failure.swift (10471 of 11161)
******************** TEST 'Swift(linux-x86_64) :: Index/Store/output-failure.swift' FAILED ********************
Script:
--
rm -rf "/root/swift-source/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Index/Store/Output/output-failure.swift.tmp" && mkdir -p "/root/swift-source/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Index/Store/Output/output-failure.swift.tmp"
mkdir /root/swift-source/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Index/Store/Output/output-failure.swift.tmp/idx
/root/swift-source/build/buildbot_linux/swift-linux-x86_64/bin/swift -frontend -target x86_64-unknown-linux-gnu -module-cache-path '/root/swift-source/build/buildbot_linux/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu/clang-module-cache' -swift-version 3 /root/swift-source/swift/test/Index/Store/output-failure.swift -typecheck
chmod -w /root/swift-source/build/buildbot_linux/swift-linux-x86_64/test-lin
class HighlightColorTextFieldCell : NSTextFieldCell {
var hightlightColor: NSColor? {
didSet {
updateTextColor()
}
}
var nonHighlightedTextColor: NSColor? {
didSet {