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
testing 123 |
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
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
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
! special | |
*.foreground: #d2d4de | |
*.background: #161821 | |
*.cursorColor: #d2d4de | |
! black | |
*.color0: #161821 | |
*.color8: #6b7089 | |
! red |
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/sudo sh | |
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+. | |
## From `strings ruby_concealer.so`: | |
## | |
## > This obfuscation is intended to discourage GitHub Enterprise customers | |
## > from making modifications to the VM. | |
## | |
## Well, good, as long as its not intended to discourage *me* from doing this! |
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
> Dan Buch of Pittsburgh aka meatballhat suggested I contact you. I'm | |
> transitioning into Ruby and Rail from another completely unrelated profession | |
> and I'd like to contribute to open source projects as much as I can. I think | |
> it'll help me move beyond tutorials and books. I've gone through several of | |
> them already, including Michael Hartl's free tutorial as well as Pragmatic | |
> Programmers' Programming Ruby. Do you have any recommendations? | |
It’s great to hear that you want to contribute to open source! I had dreams of | |
contributing to Rails itself and maybe even become a regular contributor. | |
However, the framework code itself was completely overwhelming to me as someone |
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
class Iterator < Enumerator | |
def initialize(object, &iterate) | |
super() do |y| | |
y << object | |
loop { y << object = iterate[object] } | |
end | |
end | |
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
Rake::Task["assets:environment"].clear | |
namespace :assets do | |
task :environment do | |
Bundler.require(:assets) | |
end | |
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
# jruby 1.7.4.dev (1.9.3p392) 2013-03-30 fffffff on Java HotSpot(TM) 64-Bit Server VM 1.7.0_15-b03 [darwin-x86_64] | |
Object.__id__ | |
Object.instance_variable_set(:@foo, "foo") | |
o = Object.new | |
o.__id__ | |
o.instance_variable_set(:@foo, "foo") | |
p o.__id__ # => 2002 |
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
class Item | |
def does_something(publishing_house = PublishingHouse.new) | |
publishing_house.publish(@document) | |
end | |
end | |
it 'publishes the document' do | |
publishing_house = stub('PublishingHouse') | |
publishing_house.should_receive(:publish).with(document) |
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
class Proc | |
def ! | |
proc { |*args, &blk| !call(*args, &blk) } | |
end | |
end | |
puts ["", "abc"].detect(&!(:empty?.to_proc)) |
NewerOlder