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
| float3 GerstnerWave(float3 position, float steepness, float wavelength, float speed, float direction, inout float3 tangent, inout float3 binormal) | |
| { | |
| direction = direction * 2 - 1; | |
| float2 d = normalize(float2(cos(3.14 * direction), sin(3.14 * direction))); | |
| float k = 2 * 3.14 / wavelength; | |
| float f = k * (dot(d, position.xz) - speed * _Time.y); | |
| float a = steepness / k; | |
| tangent += float3( | |
| -d.x * d.x * (steepness * sin(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
| /* | |
| Attach this to an object you want to "float" on a surface. | |
| For this component to work you need to supply an array of Transforms indicating the points | |
| on the object that will have the buoyancy applied to it. For instance, a cube may have points on each corner touching the surface. | |
| */ | |
| using UnityEngine; |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using UnityEngine; | |
| public class MazeGenerator : MonoBehaviour | |
| { | |
| [SerializeField] | |
| int seed; |
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 bpy | |
| import os | |
| from copy import copy | |
| # export to blend file location | |
| basedir = os.path.dirname(bpy.data.filepath) | |
| if not basedir: | |
| raise Exception("Blend file is not saved") |
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
| using UnityEngine; | |
| using Cinemachine; | |
| public class CameraController : MonoBehaviour | |
| { | |
| [SerializeField] private CinemachineVirtualCamera cinemachineVirtualCamera; | |
| private const float MIN_FOLLOW_Y_OFFSET = 2f; | |
| private const float MAX_FOLLOW_Y_OFFSET = 12f; |
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
| package com.myapplication.email | |
| import org.springframework.beans.factory.annotation.Value | |
| import org.springframework.context.annotation.Bean | |
| import org.springframework.context.annotation.Configuration | |
| import software.amazon.awssdk.regions.Region | |
| import software.amazon.awssdk.services.ses.SesClient | |
| @Configuration | |
| class EmailClientConfiguration { |
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
| package com.myapplication.email | |
| import arrow.core.Either | |
| import org.springframework.stereotype.Component | |
| import software.amazon.awssdk.services.ses.SesClient | |
| import software.amazon.awssdk.services.ses.model.Body | |
| import software.amazon.awssdk.services.ses.model.Content | |
| import software.amazon.awssdk.services.ses.model.Destination | |
| import software.amazon.awssdk.services.ses.model.Message | |
| import software.amazon.awssdk.services.ses.model.SendEmailRequest |
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
| package com.myapplication.email | |
| import arrow.core.Either | |
| import org.junit.jupiter.api.Assertions.fail | |
| import org.junit.jupiter.api.Test | |
| import org.springframework.boot.test.context.SpringBootTest | |
| import org.springframework.test.context.ActiveProfiles | |
| import org.testcontainers.containers.localstack.LocalStackContainer | |
| import org.testcontainers.utility.DockerImageName | |
| import software.amazon.awssdk.auth.credentials.AwsBasicCredentials |
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 org.springframework.web.cors.CorsUtils | |
| import org.springframework.context.annotation.Configuration | |
| import org.springframework.security.config.annotation.web.builders.HttpSecurity | |
| import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter | |
| @Configuration | |
| class SecurityConfig : WebSecurityConfigurerAdapter() { | |
| override fun configure(http: HttpSecurity) { | |
| http | |
| .authorizeRequests() |
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
| package com.myapplication | |
| import org.springframework.beans.factory.annotation.Value | |
| import org.springframework.context.annotation.Bean | |
| import org.springframework.context.annotation.Configuration | |
| import org.springframework.web.servlet.config.annotation.CorsRegistry | |
| import org.springframework.web.servlet.config.annotation.WebMvcConfigurer | |
| @Configuration | |
| class WebServerConfiguration { |
NewerOlder