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
//! The Credentials Provider for an AWS Resource's IAM Role (using IMDSv2). | |
use async_trait::async_trait; | |
use futures::TryFutureExt; | |
use std::time::Duration; | |
use rusoto_core::credential::{AwsCredentials, CredentialsError, ProvideAwsCredentials}; | |
const AWS_CREDENTIALS_PROVIDER_IP: &str = "169.254.169.254"; | |
const AWS_CREDENTIALS_PROVIDER_PATH: &str = "latest/meta-data/iam/security-credentials"; |
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
root@bd89e931d176:/app# cargo watch --debug -x run | |
2020-07-18T16:03:00.476+00:00 - DEBUG - Load Git/VCS ignores: true | |
2020-07-18T16:03:00.476+00:00 - DEBUG - Load .ignore ignores: true | |
2020-07-18T16:03:00.476+00:00 - DEBUG - Default ignores: ["*/.DS_Store", "*.sw?", "*.sw?x", "#*#", ".#*", ".*.kate-swp", "*/.hg/**", "*/.git/**", "*/.svn/**", "*.db", "*.db-*", "*/*.db-journal/**", "*/target/**"] | |
2020-07-18T16:03:00.476+00:00 - DEBUG - All ignores: ["*/.DS_Store", "*.sw?", "*.sw?x", "#*#", ".#*", ".*.kate-swp", "*/.hg/**", "*/.git/**", "*/.svn/**", "*.db", "*.db-*", "*/*.db-journal/**", "*/target/**"] | |
2020-07-18T16:03:00.476+00:00 - DEBUG - File updates debounce: 0.5 seconds | |
2020-07-18T16:03:00.476+00:00 - DEBUG - Watches: ["."] | |
2020-07-18T16:03:00.476+00:00 - DEBUG - Commands: ["cargo run"] | |
2020-07-18T16:03:00.476+00:00 - DEBUG - Watchexec arguments: Args { cmd: ["cargo run"], paths: ["."], filters: [], ignores: ["*/.DS_Store", "*.sw?", "*.sw?x", "#*#", ".#*", ".*.kate-swp", "*/.hg/**", "*/.git/**", "*/.svn/** |
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
5979 Oct 17 09:48:13 | |
1820 Oct 17 09:48:14 | |
25 Oct 17 09:48:21 | |
29031 Oct 17 09:48:22 | |
17973 Oct 17 09:48:23 | |
31946 Oct 17 09:48:24 | |
57835 Oct 17 09:48:25 | |
51283 Oct 17 09:48:26 | |
39697 Oct 17 09:48:27 | |
32205 Oct 17 09:48:28 |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
void BeOnTheLookout(float radius) { | |
Collider[] hitColliders = Physics.OverlapSphere(transform.position, radius); | |
int highestBounty = 0; | |
Collider mostWantedCriminal = null; | |
foreach (Collider criminal in hitColliders) { | |
var bounty = criminal.GetComponent<Bounty>(); | |
if (bounty == null) { | |
continue; | |
} |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using UnityEngine; | |
using UnityEngine.Events; | |
using NUnit.Framework; |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace DTAnimatorStateMachine { | |
public static class StateBehaviourExtensions { | |
public static IEnumerable<IStateBehaviour<TStateMachine>> GetStateBehaviours<TStateMachine>(this TStateMachine stateMachine, Animator animator) { | |
StateMachineBehaviour[] behaviours = animator.GetBehaviours<StateMachineBehaviour>(); | |
foreach (StateMachineBehaviour behaviour in behaviours) { |
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
using System; | |
using System.Collections; | |
using UnityEngine; | |
namespace DT { | |
public class LogicalStateMachineBehaviour : StateMachineBehaviour { | |
// PRAGMA MARK - StateMachineBehaviour Lifecycle | |
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { | |
this.Animator = animator; |
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
class MoveInFacingDirection : LogicalStateMachineBehaviour { | |
[SerializeField] private float _speed = 5.0f; | |
void OnStateUpdate() { | |
this.MoveInFacingDirection(); | |
} | |
... | |
} |
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
class TriggerContinueAfterDelay : LogicalStateMachineBehaviour { | |
[SerializeField] private float _delay = 1.0f; | |
void OnStateEntered() { | |
this.DoAfterDelay(this._delay, () => { | |
this.Animator.SetTrigger("Continue"); | |
} | |
} | |
} |
NewerOlder