Skip to content

Instantly share code, notes, and snippets.

View danielrotaermel's full-sized avatar

Daniel Rotärmel danielrotaermel

View GitHub Profile

XCode Duplicate Line Shortcuts

Key Bindings to duplicate lines in Xcode similar to VSCode

HINT: these don't mess with the clipboard or the undo history

  • Copy the following snippet into
    /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist
    
@danielrotaermel
danielrotaermel / discipline-xcode.sh
Last active September 21, 2020 13:04
A little script to reduce the size of Xcode by deleting unneeded platforms (tvOS, watchOS, ...) and Simulator Devices
#!/bin/bash
# Author: Daniel Rotärmel
du -sh ~/Library/Developer/Xcode
du -sh /Applications/Xcode.app
#du -sh ~/Library/Developer/Xcode/iOS\ DeviceSupport/ 2> /dev/null
#du -sh ~/Library/Developer/CoreSimulator/Devices/ 2> /dev/null
#du -sh /Applications/Xcode.app/Contents/Developer/Platforms/AppleTV* 2> /dev/null
# make editable by group
sudo chmod -R 775 /var/www/html
# add myself to group www-data (apache default group)
sudo usermod -a -G www-data ${USER}
@danielrotaermel
danielrotaermel / splice-account-switcher.sh
Last active December 3, 2019 11:35
switch between 2 splice users
#!/bin/bash
# script to switch between splice users
# get currently logged in user
current_username=`security find-generic-password -s "Digital Creations Inc:Splice:credentials" 2> /dev/null | grep -o 'acct.*' | cut -f3- -d\" | rev | cut -c 2- | rev`
current_token=`security find-generic-password -s "Digital Creations Inc:Splice:credentials" -w 2> /dev/null`
# get saved switcher accounts
saved_username=`security find-generic-password -a "saved-user" -s "splice-account-switcher" 2> /dev/null | grep -o 'acct.*' | cut -f3- -d\" | rev | cut -c 2- | rev`
saved_token=`security find-generic-password -s "splice-account-switcher" -w 2> /dev/null`
@danielrotaermel
danielrotaermel / automator_new_md_file.scpt
Last active March 21, 2023 03:51 — forked from rarylson/automator_new_file.scpt
AppleScript to create a new Markdown file in Finder (to be used in Automator)
-- AppleScript to create a new file in Finder
--
-- Use it in Automator, with the following configuration:
-- - Service receives: no input
-- - In: Finder.app
--
-- References:
-- - http://apple.stackexchange.com/a/129702
-- - http://stackoverflow.com/a/6125252/2530295
-- - http://www.russellbeattie.com/blog/fun-with-the-os-x-finder-and-applescript