This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class EndlessSpace : MonoBehaviour { | |
public GameObject tile; | |
public GameObject player; | |
private float width, height; | |
private Vector3 offset, up, right, down, left; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ConfigurationProxy | |
attr_reader :data | |
def initialize | |
@data = {} | |
end | |
def method_missing(method, *args, &blk) | |
if args.any? || block_given? | |
if block_given? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...---... | |
../ / | \ \.. | |
./ / / | \ \ \. | |
/ / / | \ \ \ | |
/ / / | \ \ \ | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
\ | / | |
\ | / | |
\ | / | |
\ | / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.:IIIIHIHHIHHHII::I:. | |
.IIIIHIHHHHHHIHIIIIMHHI:, | |
:IIIIHIHHHHHHMMHHIHHIIHHIII:. | |
.:IHIHHHHHHHHHHHHHIHIHHIHHHIH:I:, | |
,.:HIHHHHHHHHHHHHHHHHHHHHHIHIHHII:. | |
,.:IHHHHHHHHHHMMMMHHHHHHHIIHHHIHIII, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def current_user_session | |
return @current_user_session if defined?(@current_user_session) | |
@current_user_session = UserSession.find | |
end | |
kürzer: | |
def current_user_session | |
@current_user_session ||= UserSession.find | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
validates_uniqueness_of :email, :case_sensitive => false | |
validate :valid_email? | |
private | |
def valid_email? | |
address = EmailVeracity::Address.new(email) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place this in application_helper.rb | |
def set_page_title(title = nil, &block) | |
if block_given? | |
html = capture(&block) | |
concat(html) | |
end | |
@page_title = title || strip_tags(html) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- set_page_title "Neuer User" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_page_title(title = nil, &block) | |
if block_given? | |
html = capture(&block) | |
concat(html) | |
end | |
@page_title = title || strip_tags(html) | |
end |
OlderNewer