To create a custom key bindings file goto XCode>Preferences>Bindings> Duplicate an existing binding and name it whatever you want then go to and open the file you just created in a text editor so you can see the xml output.
~/Library/Application Support/Xcode/Key Bindings/*.pbxkeys
A good list of available commands can be found here
1. Duplicate code!
I can't believe xcode doesn't have this in Eclipse you simple select your text and press Ctrl + Alt and either Up or Down on the keypad and it will duplicate your code placing it either above or below the current selection. It will also reselect the newly duplicated code so that you can duplicate it as many times as you like.
<key>^~\U700</key>
<array>
<string>copy:</string>
<string>moveUp:</string>
<string>moveToEndOfLine:</string>
<string>insertLineBreak:</string>
<string>insertNewLine:</string>
<string>setMark:</string>
<string>paste:</string>
<string>selectToMark:</string>
</array>
<key>^~\U701</key>
<array>
<string>copy:</string>
<string>moveDown:</string>
<string>moveToBeginningOfLine:</string>
<string>insertLineBreak:</string>
<string>insertNewLine:</string>
<string>moveUp:</string>
<string>setMark:</string>
<string>paste:</string>
<string>selectToMark:</string>
</array>
2. Delete Line.
Deletes the current line your cursor is on. press Ctrl + D.
<key>^d</key>
<array>
<string>cut:</string>
<string>selectLine:</string>
<string>cut:</string>
</array>