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
bool CollisionTest() | |
{ | |
var aRectangle = new Rectangle(_a.X, _a.Y, _a.Width, _a.Height); | |
var bRectangle = new Rectangle(_b.X, _b.Y, _b.Width, _b.Height); | |
return Intersects(aRectangle, bRectangle); | |
} | |
bool Intersects(Rectangle a, Rectangle b) | |
{ |
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.Collections; | |
public abstract class Behaviour | |
{ | |
private readonly List<Stack<IEnumerator>> _activeCoroutines = new(); | |
public virtual void Start() | |
{ | |
} |
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.IO; | |
using ProtoBuf; | |
using ProtoBuf.Meta; | |
using UnityEngine; | |
public class PlayerBehaviour : MonoBehaviour | |
{ | |
private string _saveFile; | |
[field: SerializeField] |
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 Random = System.Random; | |
public static class RandomExtensions | |
{ | |
public static Vector2 NextOnUnitCircle(this Random random) | |
var angle = random.NextSingle(0, 360f) * Mathf.Deg2Rad; | |
var x = Mathf.Cos(angle); | |
var y = Mathf.Sin(angle); |
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
// ==UserScript== | |
// @name Phasmophobia Evidence Tracker Enhanced | |
// @version 1 | |
// @namespace https://phasmophobiatracker.site/ | |
// @run-at document-start | |
// ==/UserScript== | |
const addJQuery = function(callback) { | |
const script = document.createElement('script'); | |
script.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'); |
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
public static void Main() { | |
FizzBuzz(100, new[]{("Fizz",3),("Buzz",5)}); | |
} | |
public static void FizzBuzz(int c, (string,int)[] d) { | |
bool f(int n, int d)=>n%d==0; | |
for (int i=1;i<=c;i++) { | |
bool p=false; | |
for (int m=0;m<d.Length;m++) { |
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
.data_start | |
.export amplitude | |
.export frequency | |
.sync x, smooth | |
.sync y, smooth | |
Vector3_tmp: %UnityEngineVector3, null | |
instance_0: %UnityEngineTransform, this | |
amplitude: %SystemSingle, 0.25 | |
frequency: %SystemSingle, 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
/// <summary> | |
/// Calculates the Ackerman function for two values. | |
/// </summary> | |
/// <param name="m">The first value.</param> | |
/// <param name="n">The second value.</param> | |
/// <returns>Returns the result of the Ackerman function.</returns> | |
int Ackerman(int m, int n) | |
{ | |
if (m == 0) | |
{ |
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
# Force HTTPS | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteCond %{REMOTE_ADDR} !127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} | |
RewriteCond %{REMOTE_ADDR} !localhost | |
RewriteCond %{REMOTE_ADDR} !::1 | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] |
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
; //ip macro by default - feel free to change this | |
; to whatever suits you best | |
; | |
; Oliver Davenport | |
:://ip:: | |
whr := ComObjCreate("WinHttp.WinHttpRequest.5.1") | |
; default format from ipify api is text/plain |
NewerOlder