Skip to content

Instantly share code, notes, and snippets.

John Lin johnlinvc

Block or report user

Report or block johnlinvc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
johnlinvc /
Created May 24, 2019 — forked from prestia/
Instructions on how to install Magic the Gathering Arena on macOS with Retina support.

Installing MTGA on macOS using Wine, and making it look pretty!

The following instructions are heavily inspired by /u/uhohohdear. I modified uhohohdear's instructions and then added support for Retina/HiDPI displays and instructions about how to update MTGA.


  1. Your macOS/OS X version must be 10.8 or greater
  2. Your Mac must support OpenGL 4.0 or greater (you can find out whether it does here)
  3. You must download the Magic the Gathering Arena Windows executable
  4. You must download a custom Wineskin wrapper [mirror]
import os
import subprocess
os.environ["hello"] = "world"["python", ""])
johnlinvc /
Created Oct 7, 2016 — forked from carsonmcdonald/
Build Swift on an Amazon Linux AMI
# Notes:
# I used the following AMI:
# "Amazon Linux AMI 2015.09.1 (HVM), SSD Volume Type - ami-60b6c60a"
# Running on AMI: amzn-ami-hvm-2015.09.1.x86_64-gp2 (ami-60b6c60a)
# You probably want to use an instance type with a large amount of memory. My first
# attempt was with a c4.2xlarge but it rant out of memory without using -j option to
# limit the parallel build.
johnlinvc / basketball.swift
Created Apr 11, 2016
basket ball shooting in spritekit
View basketball.swift
//: Playground - noun: a place where people can play
just copy & paste the code into an iOS playground of Xcode 7.3+
click display timeline to play in the liveview
import UIKit
import SpriteKit
View nokogiri_xmlns.rb
require 'nokogiri'
str = <<END
<cve xmlns:xsi="xxx">
doc = Nokogiri::XML(str)
cve = doc.xpath("//cve")[0]
namespaces = cve.namespaces
View http_server.ino
Web Server
A simple web server that shows the value of the analog input pins.
using an Arduino Wiznet Ethernet shield.
* Ethernet shield attached to pins 10, 11, 12, 13
* Analog inputs attached to pins A0 through A5 (optional)
johnlinvc / echo_server.rb
Created Jan 1, 2016
ruby rack echo server
View echo_server.rb
require 'rack'
app = do |env|
['200', {'Content-Type' => 'text/html'},
["hello #{env['rack.input'].read}"]]
end app
johnlinvc /
Created Dec 30, 2015
swift-stdlib-macosx-x86_64 build fail log
Building the standard library for: swift-stdlib-macosx-x86_64
cmark: using standard linker
++ cmake_config_opt cmark
++ product=cmark
++ [[ Ninja == \X\c\o\d\e ]]
+ /usr/local/bin/cmake --build /Users/johnlinvc/Projs/swift-core-2/build/Ninja-DebugAssert/cmark-macosx-x86_64 -- -j8 all
ninja: no work to do.
llvm: using standard linker
++ cmake_config_opt llvm
johnlinvc / arrayPassByValue.playground
Last active May 7, 2018
Demo how to pass array by reference in swift
View arrayPassByValue.playground
//: Playground - noun: a place where people can play
import UIKit
class Foo {
class ArrayWrapper{
var array:[Bool] = [false]
subscript(index: Int) ->Bool {
return array[index]
# Git pre-commit hook to check all staged Ruby (*.rb/haml/coffee) files
# for Pry binding references
# Installation
# ln -s /path/to/ /path/to/project/.git/hooks/pre-commit
# Based on
You can’t perform that action at this time.