Hate typing ->
? Try this.
- Use Terminal to open :
subl /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist
- Add this to the bottom of the file.
#!/bin/bash | |
mkdir ~/.dotfiles; | |
cd ~/.dotfiles; | |
ln -s ../.bash_profile; | |
ln -s ../.bash_prompt; | |
ln -s ../.exports; | |
ln -s ../.aliases; | |
ln -s ../.functions; | |
ln -s ../.profile; | |
ln -s ../.gitconfig; |
#include <iostream> | |
using namespace std; | |
void myFunc(int *r) //-- If you dereference this `r`, you'll get an int | |
{ | |
cout << " r: " << r << endl; //-- `r` is just a reference | |
cout << " *r: " << *r << endl; //-- Dereference a reference, gives me an int | |
} | |
int main(int argc, const char * argv[]) |
# Must log out and log back in for settings to take effect | |
# $ keyRepeatRate 1 # for fast | |
# $ keyRepeatRate # for defaults | |
keyRepeatRate() { | |
echo | |
echo "Resetting key repeat settings to default" | |
echo |
# Count the number of lines of code | |
lineCount() | |
{ | |
file_types=(h m hpp cpp java html js css scss py rb php sql) | |
integer totallc=0 | |
integer totalfc=0 | |
echo | |
echo '=======================' | |
echo "== CODE LINE COUNTER ==" |
[alias] | |
# Pretty log | |
lol = log --oneline --graph --pretty='format:%C(auto)%d %s%Creset %>|(60)%C(dim)(%ar) %h%Creset' | |
# Pretty status | |
st = status -s | |
# Add all, then echo the status (of what I just added) | |
as = !git add --all && git st |
/** | |
* Functions that: | |
* return multiple functions, and also | |
* contain Structs that: | |
* contain Classes that: | |
* contain Functions. | |
*/ | |
func plusOneFunctions () -> (a:(Int) -> Int, b:(Int) -> Int) { | |
struct MyStruct { |
// LINKED LIST | |
/** | |
* NODE | |
*/ | |
private class Node<T:protocol<Printable, Comparable>>: Printable, Comparable { | |
/** | |
* PROPERTIES | |
*/ | |
var info:T |
/** | |
MARK: All starts here... | |
*/ | |
func test <T> (isTrue:BooleanType, success: ()->T, fail: ()->T) -> T { | |
return isTrue ? success() : fail() | |
} | |
/** | |
MARK: - Callback Data Structures | |
*/ |
// Currying | |
func say (hello: String) (to: String) -> String { | |
return "\(hello), \(to)." | |
} | |
// English | |
let helloWorld = say("Hello")(to: "world") //-- "Hello, world." | |
// Spanish | |
let hola = say("Hola") //-- function |