Created
October 13, 2014 17:45
-
-
Save ChrisBuchholz/b29f40f3a1c5788d3f1c to your computer and use it in GitHub Desktop.
New XCode Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TIMESTAMP=`date +%s` | |
PLAYGROUNDDIR=~/Playgrounds/ | |
NEW=$TIMESTAMP.playground | |
PLAYGROUND=$PLAYGROUNDDIR$NEW | |
mkdir -p $PLAYGROUND | |
cat > $PLAYGROUND/section-1.swift <<EOF | |
// Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
EOF | |
cat > $PLAYGROUND/contents.xcplayground <<EOF | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<playground version='1.0' sdk='iphonesimulator'> | |
<sections> | |
<code source-file-name='section-1.swift'/> | |
</sections> | |
</playground> | |
EOF | |
touch $PLAYGROUND/Results.playgrounddata | |
open $PLAYGROUND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TIMESTAMP=`date +%s` | |
PLAYGROUNDDIR=~/Playgrounds/ | |
NEW=$TIMESTAMP.playground | |
PLAYGROUND=$PLAYGROUNDDIR$NEW | |
mkdir -p $PLAYGROUND | |
cat > $PLAYGROUND/section-1.swift <<EOF | |
// Playground - noun: a place where people can play | |
import Cocoa | |
var str = "Hello, playground" | |
EOF | |
cat > $PLAYGROUND/contents.xcplayground <<EOF | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<playground version='1.0' sdk='macosx'> | |
<sections> | |
<code source-file-name='section-1.swift'/> | |
</sections> | |
</playground> | |
EOF | |
touch $PLAYGROUND/Results.playgrounddata | |
open $PLAYGROUND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment