Skip to content

Instantly share code, notes, and snippets.

View MarkBTomlinson's full-sized avatar

Mark B Tomlinson MarkBTomlinson

View GitHub Profile
@artifactsauce
artifactsauce / backup_homedir.sh
Created November 2, 2011 01:02
Backup script for Mac OS X home directory by rsync
#!/bin/sh
CMDNAME=`basename $0`
while getopts n OPT
do
case $OPT in
"n" ) DRY_RUN="--dry-run" ;;
* ) echo "Usage: $CMDNAME [-n]" 1>&2
exit 1 ;;
@emotality
emotality / duplicate_line_xcode.md
Last active April 6, 2024 04:23
Xcode - Duplicate Line key binding

NOTE (2022-07-09): Xcode finally added this functionality in Xcode 14, please see release notes here:

New Features in Xcode 14 Beta 3
When editing code, the Edit > Duplicate menu item and its corresponding keyboard shortcut now duplicate the selected text — or the line that currently contains the insertion point, if no text is selected. (8614499) (FB5618491)


Xcode line duplicate

Bind keys to duplicate lines in Xcode

@CodeSlicing
CodeSlicing / custom-shortcuts.txt
Last active December 16, 2021 07:33
Dictionary entries for CodeSlicing episode on custom shortcuts
<key>User Defined</key>
<dict>
<key>Insert New Line Above Current Line</key>
<string>moveUp:, moveToEndOfLine:, insertNewline:</string>
<key>Insert New Line Below Current Line</key>
<string>moveToEndOfLine:, insertNewline:</string>
<key>Duplicate Current Lines Down</key>
<string>selectParagraph:, delete:, yank:, moveToBeginningOfParagraph:, yank:, moveUp:, moveToEndOfParagraph:</string>
</dict>