Skip to content

Instantly share code, notes, and snippets.

View caseypugh's full-sized avatar
🤡
🤡🤡🤡🤡🤡🤡🤡🤡🤡

CPU caseypugh

🤡
🤡🤡🤡🤡🤡🤡🤡🤡🤡
View GitHub Profile
@jamiew
jamiew / .gitconfig
Last active June 15, 2020 20:03
public pieces of my .gitconfig
[user]
name = Jamie Dubs
email = noreply@example.com
[apply]
whitespace = fix
[branch]
autosetuprebase = always
autosetupmerge = always
[color]
branch = auto
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 3, 2024 10:01
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@insdavm
insdavm / WireGuard-site-to-site.md
Last active May 3, 2024 21:19
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@ssshake
ssshake / isWrit
Last active September 29, 2023 06:15
Photon PUN Cheat Sheet
## Photon Methods
**public class Blank : Photon.PunBehaviour**
instead of mono behavior, use this to receive photon callbacks in your script.
**public override void OnLeftRoom()**
An example of overriding a punbehavior callback
@panva
panva / README.md
Last active October 5, 2023 02:47
Simple Device Flow Login CLI implementation

Simple Device Flow Login CLI implementation

run

npx https://gist.github.com/panva/ebaacfe433a8677bdbf458f6e1132045
@ayamflow
ayamflow / rotate-uv.glsl
Created January 16, 2018 23:24
Rotate UV in GLSL
vec2 rotateUV(vec2 uv, float rotation)
{
float mid = 0.5;
return vec2(
cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid,
cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid
);
}
vec2 rotateUV(vec2 uv, float rotation, vec2 mid)
@RoyalIcing
RoyalIcing / Dockerfile
Last active April 2, 2020 17:06
Rails 5.1 Dockerfile
FROM ruby:2.4-alpine
ENV PATH /root/.yarn/bin:$PATH
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh build-base nodejs tzdata
RUN apk update \
&& apk add curl bash binutils tar gnupg \
&& rm -rf /var/cache/apk/* \
@ayamflow
ayamflow / gist:96a1f554c3f88eef2f9d0024fc42940f
Last active March 20, 2024 02:48
Threejs Fit plane to screen
var cameraZ = camera.position.z;
var planeZ = 5;
var distance = cameraZ - planeZ;
var aspect = viewWidth / viewHeight;
var vFov = camera.fov * Math.PI / 180;
var planeHeightAtDistance = 2 * Math.tan(vFov / 2) * distance;
var planeWidthAtDistance = planeHeightAtDistance * aspect;
// or
@dddnuts
dddnuts / Fastfile
Created June 4, 2016 10:39
Build ipa from Unity project with fastlane
fastlane_version "1.94.0"
default_platform :ios
platform :ios do
desc "Run Unity Editor tests"
lane :test_unit do
unity(
run_editor_tests: true
)
using UnityEngine;
public class WeightedRandomNumber {
AnimationCurve _curve;
float[] _cumulativeWeights;
float _totalWeight;
float _step;
float _curveTime;