Skip to content

Instantly share code, notes, and snippets.

View Sacristan's full-sized avatar

Ģirts Ķesteris Sacristan

View GitHub Profile
@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
@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);
@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
@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
@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
@janko
janko / 01-requirements.md
Last active March 6, 2023 11:15
ActiveRecord vs Sequel (require time)
$ brew install cloc
$ bundle install
@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
@DashW
DashW / ScreenRecorder.cs
Last active June 22, 2025 23:29
ScreenRecorder - High Performance Unity Video Capture Script
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
class BitmapEncoder
{
public static void WriteBitmap(Stream stream, int width, int height, byte[] imageData)
@maxattack
maxattack / QuaternionUtil.cs
Last active August 22, 2025 12:15
Some Helper Methods for Quaternions in Unity3D
using UnityEngine;
/*
Copyright 2016 Max Kaufmann (max.kaufmann@gmail.com)
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 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN