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
/// | |
/// https://stackoverflow.com/a/29741007 | |
/// | |
let s = Struct() // Struct | |
withUnsafePointer(to: s) { | |
print(String(format: "%p", $0) | |
} | |
/// | |
/// http://stackoverflow.com/a/36539213/226791 |
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
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
enum SkyBehavior: String { | |
case clickSky = "clickSky" | |
case clickSun = "clickSun" | |
case clickSunspot = "clickSunspot" | |
} |
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
# Swift syntax highlighting for Vim | |
# Original Source: http://wingsquare.com/blog/swift-script-syntax-highlighting-and-indentation-for-vim-text-editor/ | |
# Another helpful article: https://billyto.github.io/blog/swift-syntax-vim | |
# More about Vim packages: http://vimcasts.org/episodes/packages/ | |
echo "--- creating ~/.vim/pack/bundle/start dir.." | |
mkdir -p ~/.vim/pack/bundle/start | |
echo "--- Cloning Apple's Swift repo.." |
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
# Clone llama.cpp | |
git clone https://github.com/ggerganov/llama.cpp.git | |
cd llama.cpp | |
# Build it | |
make clean | |
LLAMA_METAL=1 make | |
# Download model | |
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin |