Skip to content

Instantly share code, notes, and snippets.

View niittymaa's full-sized avatar

niittymaa niittymaa

View GitHub Profile
@riyadparvez
riyadparvez / FloydCycleDetectionAlgorithm.cs
Created July 8, 2013 08:55
Floyd cycle detection algorithm in C#.
public static bool FloydCycleDetection<T>(LinkedList<T> list)
{
var tortoise = list.First;
var hare = list.First;
while (tortoise != null && hare != null)
{
if(tortoise == hare)
{
return true;
@kscottz
kscottz / DeMagicEye.py
Created July 10, 2013 05:21
Generate a depth map from a "Magic Eye" random dot autostereogram.
from SimpleCV import Image, Display, Color
from multiprocessing import Process, Queue
import numpy as np
import cv2
import copy
import sys
# caclulate the value of a row
# using the integral image
def idxToSum(x1,x2,y,integral):
# assume x2 > x1
@CanOfColliders
CanOfColliders / split-skymap-into-images.py
Created July 15, 2013 10:08
Simple script to split a cubemap/skymap image produced by blender into 6 separated image files for use in Unity3Ds skybox materials.
#!/usr/bin/env python
# Will split a png cubemap/skymap image produced by blender into 6 separated image files for use in a skybox within unity
# Requires Python Imaging Library > http://www.pythonware.com/products/pil/
# The author takes no responsibility for any damage this script might cause,
# feel free to use, change and or share this script.
# 2013-07, CanOfColliders, [email protected]
from PIL import Image
@keiranlovett
keiranlovett / unity: wind
Last active November 1, 2018 21:09
Custom Wind Script = random rotation around world.space
using UnityEngine;
using System.Collections;
public class windController : MonoBehaviour {
//TODO
//1) Inwards / Outwards Direction
float t;
int direction = 1; //Direction of rotation the wind object makes
@rxaviers
rxaviers / gist:7360908
Last active December 7, 2025 11:03
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@rosszurowski
rosszurowski / lerp-color.js
Last active July 10, 2025 05:21
Linear interpolation for hexadecimal colors.
/**
* A linear interpolator for hexadecimal colors
* @param {String} a
* @param {String} b
* @param {Number} amount
* @example
* // returns #7F7F7F
* lerpColor('#000000', '#ffffff', 0.5)
* @returns {String}
*/
@TomByrne
TomByrne / MultiExporter.jsx
Last active November 24, 2025 05:37
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
//
@rcotrina94
rcotrina94 / How to use Images as Radio buttons.md
Last active January 30, 2025 09:22
How to use images for radio buttons (input-radio).
menuCommandString, UI MenuString en_US
-------------------------------------
new, new
newFromTemplate, New From Template
open, open
saveacopy, store copies
Adobe AI Save For Web, the storage format used for the Web (W)
Adobe AI Save Selected Slices, stored in the selected slice
revert, restore
AI Place, into (L)
@thomxc
thomxc / InsertDate.gs
Created April 2, 2014 08:17
Google Docs Script Macro: Insert Date
/**
* The onOpen function runs automatically when the Google Docs document is
* opened. Use it to add custom menus to Google Docs that allow the user to run
* custom scripts. For more information, please consult the following two
* resources.
*
* Extending Google Docs developer guide:
* https://developers.google.com/apps-script/guides/docs
*
* Document service reference documentation: