This file contains hidden or 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
| # name: 'Replace Me' | |
| # preferred_background: white | |
| # References: | |
| # - <https://fishshell.com/docs/current/cmds/fish_config.html#theme-files> | |
| # - <https://fishshell.com/docs/current/interactive.html#syntax-highlighting> | |
| # | |
| # SYNTAX | |
| # |
This file contains hidden or 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
| name: bandersnatch-test | |
| services: | |
| test-runner: | |
| build: | |
| dockerfile: 'runner.Dockerfile' | |
| environment: | |
| AWS_ACCESS_KEY: 'minioadmin' | |
| AWS_SECRET_ACCESS_KEY: 'minioadmin' | |
| AWS_EC2_METADATA_DISABLED: 'true' | |
| BANDERSNATCH_S3_ENDPOINT_URL: 'http://block-storage:9000' |
This file contains hidden or 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
| /* Copied from a playground file */ | |
| // Produce a list of length N by cycling an original list | |
| func cycleN<T>(base: [T], length: Int) -> [T] { | |
| var buildup: [T] = [] | |
| while buildup.count < length { | |
| buildup.appendContentsOf(base) | |
| } | |
| return Array(buildup.prefix(length)) | |
| } |
This file contains hidden or 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 protocol with an associated type requirement | |
| protocol SomeProtocol { | |
| associatedtype SomePAT | |
| func someFunction(param: SomePAT) | |
| } | |
| /// A generic class which satisfies the associated type with its generic parameter | |
| class Base<T>: SomeProtocol { | |
| func someFunction(param: T) { |
This file contains hidden or 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
| // FirebaseValue.swift | |
| // Created by Matt Seiler on 7/14/16. | |
| // Copyright © 2016 Matthew Seiler. All rights reserved. | |
| import FitnetUtils | |
| import FirebaseDatabase | |
| import Foundation | |
| class FirebaseValue<T>: Observable<T?> { |
This file contains hidden or 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 socket | |
| import time | |
| import colorsys | |
| # address of badge | |
| ADDR = "192.168.0.16" | |
| # found in src/main.cpp | |
| PORT = 11337 |
This file contains hidden or 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 java.util.ArrayList; | |
| import java.util.Comparator; | |
| import java.util.List; | |
| public class AnonTest { | |
| public static void main(String[] args) { | |
| // | |
| System.out.printf("i\tNamed\tAnonymous%n"); | |
| for (int i = 0; i < 10; i += 1) { |
This file contains hidden or 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
| #lang racket | |
| (require pict) | |
| ;;;; The original code (it works alright) | |
| #| | |
| (define faces '(N S E W)) | |
| (define (next-face f) |
This file contains hidden or 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
| module Spiral where | |
| import System.Environment | |
| import qualified Data.List as List | |
| import qualified Data.Set as Set | |
| {- Process outline: | |
| - 1. Create infinite sequence of points on the spiral | |
| - 2. Take a finite subsequence | |
| - 3. Shift all the points so the origin is in the top left |
This file contains hidden or 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 Foundation | |
| /* | |
| Demonstrates creating and avoiding retention cycles in callbacks | |
| */ | |
| /* UTILITIES */ | |
| /// Wraps a something in a class | |
| class Box<T> { |
NewerOlder