Skip to content

Instantly share code, notes, and snippets.

View Sacristan's full-sized avatar

Ģirts Ķesteris Sacristan

View GitHub Profile
@createdbyx
createdbyx / ContinuationManager
Created November 24, 2015 09:31
Provides a simulated multithreading manager for invoking callbacks on the main unity thread.
using System;
using System.Collections.Generic;
using System.Threading;
using UnityEditor;
/// <summary>
/// Provides a simulated multithreading manager for invoking callbacks on the main unity thread.
/// </summary>
public static class ContinuationManager
@janko
janko / 01-requirements.md
Last active March 6, 2023 11:15
ActiveRecord vs Sequel (require time)
$ brew install cloc
$ bundle install
@cjddmut
cjddmut / EasingFunctions.cs
Last active August 11, 2025 10:50
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 2019
*
* 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
@lukebooth
lukebooth / explanation.md
Last active February 3, 2016 15:35
Session hijack ourselves

The situation

  • Using Rails 4.1.8
  • People can have a custom domain to use with our app
  • For some actions, we use ssl and redirect them to the domain we provide them

The problem

  • If the person has a custom domain, I want as much of their time using the app to be on that domain
  • I need a way to carry sessions/cookies over to another domain
  • This, for example, will allow them to use ssl to sign in on our domain and I can redirect them back to their custom domain, signed in there
@Epigene
Epigene / RSpec Workflow
Created March 4, 2015 10:18
RSpec Workflow
========== RSpec Workflow ==========
1 # Add gem stack
group :development, :test do
# Test stack
gem "rspec-rails", '~> 3.2.0'
gem "spring-commands-rspec" #Spring for rspec ^
gem "factory_girl_rails"
gem "guard-rspec"
gem 'rb-fsevent', '~> 0.9.1'
gem "faker" #šis ģenerē dummy/fake datus pēc pieprasījuma
@mzaks
mzaks / RectTransformTools.cs
Last active April 14, 2025 18:11
Adjust RectTransform Anchors for Unity UI
using UnityEngine;
using UnityEditor;
public class RectTransformTools {
[MenuItem("GameObject/Adjust RectTransform Anchors %l")]
static void Adjust()
{
foreach(GameObject gameObject in Selection.gameObjects){
adjustRectTransform(gameObject);
@Fonserbc
Fonserbc / Easing.cs
Last active July 21, 2025 06:51
Compact and simple easing functions for Unity
using UnityEngine;
/*
* Most functions taken from Tween.js - Licensed under the MIT license
* at https://github.com/sole/tween.js
* Quadratic.Bezier by @fonserbc - Licensed under WTFPL license
*/
public delegate float EasingFunction(float k);
public class Easing
@JakubNei
JakubNei / Occlusion.Area.cs
Last active April 28, 2025 13:03
Lame Implementation of Area and Portal Occlusion Culling based on DOOM 3 BFG http://www.iddevnet.com/doom3/visportals.php https://github.com/id-Software/DOOM-3-BFG
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Extensions;
namespace Occlusion
{
public class Area : MonoBehaviour
{
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active August 28, 2025 01:49
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@benblo
benblo / EditorCoroutine.cs
Created April 15, 2014 13:26
EditorCoroutine: coroutines for Unity editor operations. Usage: EditorCoroutine.start(myIEnumerator)
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Swing.Editor
{
public class EditorCoroutine