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
# demo gameplay here: https://youtu.be/wQknjYk_-dE | |
# this is the core game class. the game is pretty small so this is the only class that was created | |
class Game | |
# attr_gtk is a ruby class macro (mixin) that adds the .args, .inputs, .outputs, and .state properties to a class | |
attr_gtk | |
# this is the main tick method that will be called every frame the tick method is your standard game loop. | |
# ie initialize game state, process input, perform simulation calculations, then render | |
def tick | |
defaults |
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
/// MIT License | |
/// | |
/// Copyright (c) 2021 Lukas Kubanek, Structured Path GmbH | |
/// | |
/// Permission is hereby granted, free of charge, to any person obtaining a copy | |
/// of this software and associated documentation files (the "Software"), to deal | |
/// in the Software without restriction, including without limitation the rights | |
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
/// copies of the Software, and to permit persons to whom the Software is | |
/// furnished to do so, subject to the following conditions: |
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
require "async" | |
CONCURRENCY = 1000 | |
ITERATIONS = 100 | |
def work | |
Async do |task| | |
CONCURRENCY.times do | |
task.async do | |
sleep 1 |
If you're trying to install the postgresql gem pg
and it is failing with the following error message:
Installing pg 1.2.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: ~/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/pg-1.2.3/ext
~/.rbenv/versions/3.0.0/bin/ruby -I ~/.rbenv/versions/3.0.0/lib/ruby/3.0.0 -r ./siteconf20210125-97201-pycpo.rb extconf.rb
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
extension CLLocation: Encodable { | |
public enum CodingKeys: String, CodingKey { | |
case latitude | |
case longitude | |
case altitude | |
case horizontalAccuracy | |
case verticalAccuracy | |
case speed | |
case course | |
case timestamp |
Moved to Shopify/graphql-design-tutorial
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
// | |
// IAPHelper.swift | |
// Bandwagon | |
// | |
// Created by Andy on 2017/9/27. | |
// Copyright © 2017年 Doraemon. All rights reserved. | |
// | |
import Foundation | |
import SwiftyStoreKit |