Predefined cell accessories for UICollectionViewListCell.
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
// | |
// CGEventSupervisor.swift | |
// Mouseless Messenger Pro | |
// | |
// Created by Stephan Casas on 4/24/23. | |
// | |
import Cocoa; | |
class CGEventSupervisor { |
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
// | |
// ScrollIntoSheet.swift | |
// (c) Théo Arrouye 2024 | |
// | |
// | |
import SwiftUI | |
struct ScrollIntoSheetView: View { | |
let backgroundColor: Color = .black |
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
#!/bin/bash | |
# Setup script for setting up a new macos machine | |
echo "Starting setup" | |
# install xcode CLI | |
xcode-select —-install | |
# Check for Homebrew to be present, install if it's missing | |
if test ! $(which brew); then |
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
#!/bin/bash | |
# Create the backup directory if it does not exist | |
mkdir -p $HOME/.config-backup | |
# Check if $HOME/.config exists | |
if [ -d "$HOME/.config" ]; then | |
if [ -L "$HOME/.config" ]; then | |
# It is a symlink! | |
echo "found a symlink: $HOME/.config" |
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
#!/bin/bash | |
# Usage: provide 2 parameters(provisioning profile path and new filename) | |
# | |
# sh ./provisioning2xml.sh path xml_name | |
path=$1 | |
name=$2 | |
echo "Generating $name.xml from path: $path" | |
security cms -D -i "$path" >> ./"$name".xml | |
echo "Finished" |
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
// Append this to your .vimrc | |
au BufNewFile,BufRead Podfile set filetype=ruby |
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
guard let index = items.index(where: {$0 == item}) | |
else { | |
return | |
} | |
items.remove(at: index) |
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
//: Playground - a class that saves and retrieves an array to the device | |
import Foundation | |
class ArrayStorageManager: NSObject { | |
static let shared = ArrayStorageManager() | |
private var documentsDirectoryURL: URL { | |
let url = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first | |
return url! |
NewerOlder