Skip to content

Instantly share code, notes, and snippets.

View jinhyung's full-sized avatar

Jinhyung Park jinhyung

View GitHub Profile
# for all VMs of OS X (VirtualBox, VMWare, or Parallels)
Vagrant.configure(2) do |config|
config.vm.box = "puphpet/ubuntu1404-x64"
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get --assume-yes install curl clang libpython2.7 libicu52 git vim
curl -O https://swift.org/builds/ubuntu1404/swift-2.2-SNAPSHOT-2015-12-01-b/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04.tar.gz
tar zxf swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04.tar.gz
echo "export PATH=/home/vagrant/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04/usr/bin:\"${PATH}\"" >> .profile
echo "Swift has successfully installed on Linux"

Keybase proof

I hereby claim:

  • I am jinhyung on github.
  • I am jenix (https://keybase.io/jenix) on keybase.
  • I have a public key whose fingerprint is E4C7 3FB0 828E 0BB2 E558 338C E785 969C 158B B928

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jinhyung on github.
  • I am jenix (https://keybase.io/jenix) on keybase.
  • I have a public key whose fingerprint is 7224 EC44 1848 436A 0D12 5EC2 C898 2DD2 B565 9F87

To claim this, I am signing this object:

@jinhyung
jinhyung / NSFileHandle+Generator
Last active August 29, 2015 14:17
NSFileHandle Generator for for-loop
#!/usr/bin/env swift
import Foundation
public class _NSFileHandle_Generator: GeneratorType {
private let fileHandle: NSFileHandle
private var buffer = ""
private var previousLine = ""
private var newline: String?