Skip to content

Instantly share code, notes, and snippets.

View BruceJillis's full-sized avatar

Jillis ter Hove BruceJillis

View GitHub Profile
@BruceJillis
BruceJillis / Stars
Last active August 29, 2015 14:04
Rough translation of https://glsl.heroku.com/e#18500.0 to Unity Cg
Shader "Custom/Stars" {
Properties {
iterations("_iterations", int) = 17
formuparam("formuparam", float) = 0.53
volsteps("volsteps", int) = 20
stepsize("stepsize", float) = 0.1
zoom("zoom", float) = 0.800
tile("tile", float) = 0.850
using UnityEngine;
using System;
using Random = UnityEngine.Random;
using System.Collections;
public class StartTween : MonoBehaviour {
public GameObject target;
void OnGUI() {
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
namespace Assets.Scripts.Editor
{
public class AutoSnap : EditorWindow
{
private Vector3 prevPosition;
private bool doSnap = true;
@BruceJillis
BruceJillis / gist:3897768
Created October 16, 2012 07:26
Guess the semantics
static public function ....(Number1:Number,Number2:Number):Number {
return (Number1 >= Number2) ? Number1 : Number2;
}
public function ....():void {
_timeCounter += FlxG.elapsed;
while((_timeCounter >= time) && !paused && !finished) {
_timeCounter -= time;
_loopsCounter++;
@BruceJillis
BruceJillis / gist:1056765
Created June 30, 2011 17:49
fixed jaylist
/**
* jaylist is a wrapper for javascript's built-in hash storage system.
* It provides functions to manipulate the list.
*
* Copyright (C) 2011 by Ben Brooks Scholz
*
* 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
// ==UserScript==
// @name Twitter Sidebar Chat
// @namespace http://chattify.appspot.com/
// @description A simple extension for #newtwitter that adds a chat as a new mediatype
// @include http://twitter.com/*
// @include https://twitter.com/*
// @run_at document_end
// ==/UserScript==
(function(){