This file contains hidden or 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
| $provide.decorate('ngClick', function($delegate) { | |
| var compile = $delegate.compile; | |
| $delegate.compile = function($element, attrs) { | |
| attrs.ngClick='__wrapResult__('+attrs.ngClick+')'; | |
| var link = compile($element, attrs) | |
| return function($scope, element, attrs) { | |
| $scope.__wrapResult__ = function(expression) { | |
| return function() { |
This file contains hidden or 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
| require 'bogus/rspec' | |
| describe 'a bug' do | |
| class NotificationListener | |
| def auction_ended_no_bids(auction) | |
| end | |
| end | |
| class Auction | |
| end |
This file contains hidden or 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
| <html ng-app='demo'> | |
| <head> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script> | |
| <script type="text/javascript"> | |
| function Outer($scope) { | |
| $scope.bar = "bar from outer"; | |
| $scope.open = function(popup) { | |
| $scope.$popup[popup].open(); | |
| }; |
This file contains hidden or 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
| require 'bogus/rspec' | |
| class CallBuilder | |
| attr_accessor :fake | |
| def initialize(method, any_args, block, fake = nil) | |
| @method = method | |
| @fake = fake | |
| @args = any_args | |
| @block = block |
This file contains hidden or 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
| use_call: ; preds = %check_serial, %ip7 | |
| store i32 8, i32* %ip_pos49, !dbg !34 | |
| %push_const_fast = call %"struct.rubinius::Object"* @rbx_push_const_fast(%"struct.rubinius::State"* %state, %"struct.rubinius::CallFrame"* %call_frame30, %"struct.rubinius::ConstantCache"** inttoptr (i32 180003772 to %"struct.rubinius::ConstantCache"**)) nounwind readonly, !dbg !34 | |
| %null_check957 = icmp eq %"struct.rubinius::Object"* %push_const_fast, null, !dbg !34 | |
| br i1 %null_check957, label %ret_null47, label %check_active956, !dbg !34 | |
| continue953: ; preds = %continue955, %use_cache | |
| %constant = phi %"struct.rubinius::Object"* [ %cached_value, %use_cache ], [ %push_const_fast, %continue955 ], !dbg !34, !rbx-classid !63 | |
| %stack_pos958 = getelementptr %"struct.rubinius::Object"** %stack31, i32 1, !dbg !34 | |
| store %"struct.rubinius::Object"* %constant, %"struct.rubinius::Object"** %stack_pos958, !dbg !34 |
This file contains hidden or 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
| module HasClassName | |
| def name | |
| self.class.name | |
| end | |
| end | |
| class UserFinder | |
| include HasClassName | |
| end | |
This file contains hidden or 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
| require 'dependor' | |
| require 'dependor/shorty' # to enable takes syntax | |
| module HasClassName | |
| def name | |
| self.class.name | |
| end | |
| end | |
| class UserFinder |
This file contains hidden or 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
| wrozka@wrozka-home:~$ ruby parameters.rb | |
| The combined names are: UserFinder and UserStatusReader |
This file contains hidden or 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
| #!/usr/bin/env ruby -Ku | |
| require "nokogiri" | |
| require "iconv" | |
| # opens every file in the given dir tree and converts any html img tags to rails image_tag calls | |
| # | |
| # example usage: | |
| # ruby convert.rb ~/my_rails_app/app/views | |
| # | |
| # ***be careful and backup before using this*** |