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 Object | |
def metaclass | |
(class << self; self; end) | |
end | |
end | |
class Foo | |
puts "1. #{self} #{self.__id__}" | |
def meth1 |
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
/** | |
* Implementation of hook_menu(). | |
*/ | |
function whatever_menu() { | |
$items = array(); | |
$items['whatever/somepage'] = array( | |
'title' => 'Whatever', | |
'page callback' => 'drupal_get_form', |
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
get '/whatever/somepage' do | |
'Hello World' | |
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
if (!isObject(FollowMouseExBehavior)) | |
{ | |
%template = new BehaviorTemplate(FollowMouseExBehavior); | |
%template.friendlyName = "Follow Mouse Ex"; | |
%template.behaviorType = "Input"; | |
%template.description = "Set the object to follow the position of the mouse. This version can be " @ | |
"restricted by world limits and will obey collisions."; | |
%template.addBehaviorField(flipX, "Flip X axis", bool, true); |
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
%%{ | |
machine ruby; | |
alpha_u = alpha | '_'; | |
alnum_u = alnum | '_'; | |
boundary = ^(alnum_u | '.'); | |
newline = '\r'? '\n'; | |
consume_line = any* :>> newline; | |
id = alpha_u (alnum_u)*; |
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
#line 1 "ext/ruby.rl" | |
#include <stdio.h> | |
#include <string.h> | |
#include "ruby.h" | |
#include "lightr.h" | |
// TODO: EOF for consume_line | |
// TODO: #{ interpolation | |
// TODO: heredocs ( mirroring of identifier as well) |
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
<?php | |
/** | |
* Copyright (c) 2009 TJ Holowaychuk <[email protected]> | |
* MIT Licensed | |
*/ | |
define('GD_CONSTRAIN_DIMENSIONS_VERSION', '0.0.1'); | |
class GD_Constrain_Dimensions { |
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
# Torque Script | |
if (!isObject(FollowMouseExBehavior)) | |
{ | |
%template = new BehaviorTemplate(FollowMouseExBehavior); | |
%template.friendlyName = "Follow Mouse Ex"; | |
%template.behaviorType = "AI"; | |
%template.description = "Set the object to follow the position of the mouse. This version can be " @ | |
"restricted by world limits and will obey collisions."; |
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
/** | |
* Create a range string which can be evaluated to a native array. | |
* | |
* @param {int} start | |
* @param {int} end | |
* @return {string} | |
* @api public | |
*/ | |
function range(start, 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
# Torque Alternative Syntax | |
unless is_object(FollowMouseBehavior) | |
:template = new BehaviorTemplate(FollowMouseBehavior) | |
:template | |
.friendly_name = "..." | |
.behavior_type = "..." | |
.description = "..." |
OlderNewer