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
import UIKit | |
// Copyright 2017 Dan Rosenstark dr2050.com | |
// See http://stackoverflow.com/a/28570282/8047, too | |
class GameLoop : NSObject { | |
var doSomething: () -> ()! | |
var displayLink : CADisplayLink! | |
init(doSomething: @escaping () -> ()) { |
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
#!/usr/bin/env bash | |
# Basic setup script for a fresh Ubuntu machine. Will set the machine's | |
# hostname and install Git, Puppet and ZFS. | |
RELEASE=`lsb_release -s -c` | |
NAME="servername" | |
# Set the machine's hostname. If you pass a name as $1, that hostname | |
# will be used. Otherwise, just change the $NAME variable above. | |
if [ -n "$1" ]; then; unset $NAME && NAME=$1; fi |
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
#!/usr/bin/env bash | |
# | |
# Nginx - new server block | |
# http://rosehosting.com | |
# Functions | |
ok() { echo -e '\e[32m'$1'\e[m'; } # Green | |
working() { echo -ne '\e[1;33m'$1'\e[m'; } # Yellow | |
die() { echo -e '\e[1;31m'$1'\e[m'; exit 1; } | |