Skip to content

Instantly share code, notes, and snippets.

>> feed.search_bundles
SyntaxError: /Users/eddy/Documents/Projects/Rails/buzzminotaur_0.3/app/models/search_bundle.rb:132: syntax error, unexpected $end, expecting kEND
from /Users/eddy/.gem/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
from /Users/eddy/.gem/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:380:in `load_file'
from /Users/eddy/.gem/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Users/eddy/.gem/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:379:in `load_file'
from /Users/eddy/.gem/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:259:in `require_or_load'
from /Users/eddy/.gem/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:425:in `load_missing_constant'
from /Users/eddy/.gem/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb
@empika
empika / gist:10e703989ffecfa89a98
Last active August 29, 2015 14:16
Load an array of sprites in unity
string spriteSheet = AssetDatabase.GetAssetPath( TileMapTexture );
Sprite[] sprites = AssetDatabase.LoadAllAssetsAtPath(spriteSheet).OfType<Sprite>().ToArray();
@empika
empika / gist:b3d7c9a8b3db9aa3ee9c
Created September 16, 2014 18:18
Normal mapped transparent sprites with shadows
Shader "JM/Sprite Bumped Shadows" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
[PerRendererData] _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_BumpMap ("Normalmap", 2D) = "bump" {}
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
}
SubShader {
@empika
empika / OnConfirmCancelEditor
Created August 30, 2014 16:24
Editor extension for OnConfirmCancel
using System;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEditor;
[CustomEditor (typeof(OnConfirmCancel), true)]
public class OnConfirmCancelEditor : Editor
{
//
// Fields
@empika
empika / OnConfirmCancel
Last active August 29, 2015 14:05
Add Confirm and cancel handling to a Unity UI element
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
[Serializable]
public class ConfirmCancelEntry
{