Skip to content

Instantly share code, notes, and snippets.

View beny's full-sized avatar
:octocat:
🆙 and 🏃‍♂️

Ondra Beneš beny

:octocat:
🆙 and 🏃‍♂️
View GitHub Profile
@mtrimarchi
mtrimarchi / How_to_enable_Screen_Sharing_on_Macs_via_Terminal.md
Created December 29, 2020 15:19
How to enable Screen Sharing on Macs via Terminal

Follow these steps to enable Screen Sharing via Terminal.

  1. Navigate to Applications | Utilities and launch Terminal. If you're working from a keyboard only, press Command+Space Bar to launch Spotlight, and then enter Terminal in the search box to launch the app.

  2. Enter the following command into Terminal and press Enter to execute it. You will be prompted to provide admin credentials prior to processing the command.

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off -restart -agent -privs -all -allowAccessFor -allUsers

The command above will work most of the time, as it uses the kickstart method of enabling remote management, which in turn enables Screen Sharing as well for all users of the device. This isn't the most secure method and it's not recommended to be used like this for long periods of time due to the potential security risks of unauthorized access, but it should serve you well as a temporary workaround for the pr

@Siguza
Siguza / pallas.sh
Last active July 3, 2024 10:18
newstyle OTA
#!/usr/bin/env zsh
set -e;
set +m; # Job control would've been nice, but manual round robin it is, sigh.
if [ -z "${ZSH_VERSION+x}" ]; then
echo 'Try again with zsh.';
exit 1;
fi;
@zntfdr
zntfdr / firebase-iOS-breakdown.swift
Last active July 4, 2024 09:35
Firebase iOS Version breakdown
// How to:
// 1. Open the Firebase Analytics Dashboard
// 2. Scroll to bottom, where you see the "Users by Device model" widget
// 3. Click "View device models" in that widget (this opens the "Tech details" Firebase Analytics page)
// 4. Above the table shown in the new page, click on the “Device model” drop down menu and select “OS with Version”
// 5. Make sure to select “OS with version” and not “OS Version”
// 6. On the top right corner of the page, click on the “Share this report” icon (next to the date)
// 7. Click “Download file” on the new side bar, then “Download CSV"
// 8. Open the file and select the iOS/Android breakdown raw data
// 9. Replace the sample data in this script with your data
@hintoz
hintoz / XCODEBETAOS.sh
Last active April 24, 2019 12:50
Creates a link for iOS, tvOS, and WatchOS beta from the Xcode beta to the release Xcode. #Xcode #XcodeBeta #iOSBeta
#!/bin/sh
# ---------------------------------------------------------------------
# Copyright (C) 2019 Evgeny Dats <hintoz@gmail.com>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# ---------------------------------------------------------------------
XCODEPATH="/Applications/Xcode.app/Contents/Developer/Platforms/OSREPLACE/DeviceSupport/"
@4np
4np / HowTo use xcconfig or plist with SPM.md
Last active June 18, 2024 15:12
How to use a .xcconfig file and a .plist with a Swift Package Manager based project.

How to use a .xcconfig file and a .plist file with SPM

Worth a read for some more context.

Create a Package.xcconfig file

Create the file in the root of the project (where your Package.swift file lives as well), and use the following contents:

/// Package.xcconfig
import Foundation
// Inspired by https://gist.github.com/mbuchetics/c9bc6c22033014aa0c550d3b4324411a
struct JSONCodingKeys: CodingKey {
var stringValue: String
init?(stringValue: String) {
self.stringValue = stringValue
}
@keith
keith / testflight.sh
Last active July 1, 2024 14:57
Upload an ipa to testflight using altool
#!/bin/bash
set -euo pipefail
xcrun altool --upload-app --type ios --file "path/to/foo.ipa" --username "$ITC_USER" --password "$ITC_PASSWORD"
@mackuba
mackuba / wwdc16.md
Last active March 5, 2023 21:28
New stuff from WWDC 2016

Following the tradition from last year, here's my complete list of all interesting features and updates I could find in Apple's OSes, SDKs and developer tools that were announced at this year's WWDC. This is based on the keynotes, the "What's New In ..." presentations and some others, Apple's release notes, and blog posts and tweets that I came across in the last few weeks.

If for some reason you haven't watched the talks yet, I really recommend watching at least the "State of the Union" and the "What's New In" intros for the platforms you're interested in. The unofficial WWDC Mac app is great way to download the videos and keep track of what you've already watched.

If you're interested, here are my WWDC 2015 notes (might be useful if you're planning to drop support for iOS 8 now and start using some iOS 9 APIs).


OSX → macOS 10.12 Sierra

@steipete
steipete / ios-xcode-device-support.sh
Last active July 3, 2024 03:07
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@arleym
arleym / layouts.alfredworkflow
Created February 28, 2016 13:37
Alfred Layout Alpha
on alfred_script(q)
tell application "Google Chrome" to activate -- needs to be in front
tell application "System Events" to tell application process "Chrome"
try
repeat with x from 1 to (count windows)
get properties of window x
set position of window x to {0, 21}
set size of window x to {1280, 709}
end repeat
end try