What are you looking for in a mentor? What are your short-term and long-term goals? How do you best work with people? What level of experience with Ruby do you feel you have? What is it that you really want to be and do? What are you doing really well to help you get there? What could you be doing better in terms of getting there? How can I best help you achieve your goals? Have you had a mentor before, and if so, what was the experience like? What makes you happiest?
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
(begin | |
(send nil :require | |
(str "spec_helper")) | |
(block | |
(send nil :describe | |
(const nil :Project)) | |
(args) | |
(begin | |
(block | |
(send nil :describe |
This community is dedicated to providing a harassment-free experience for everyone. We do not tolerate harassment of participants in any form.
This code of conduct applies to all of this community's spaces, including public channels, private channels and direct messages, both online and off. Anyone who violates this code of conduct may be sanctioned or expelled from these spaces at the discretion of the administrators.
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 Chunker | |
def chunk_message(message, handle="", chunked=[]) | |
return chunked unless message.present? | |
chunks = message.split | |
proposed_chunk = [handle, chunked.last, chunks[0]].compact.join(' ').squish | |
if proposed_chunk.length <= 140 | |
chunked << [chunked.pop, chunks.shift].compact.join(' ') | |
else | |
chunked << chunks.shift |
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
p (1..100).map{|i| (i % 15 == 0 && "fizzbuzz") || (i % 3 == 0 && "fizz") || (i % 5 == 0 && "buzz") || i} * "," |
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
# config/initializers/attribute_types.rb | |
ActiveRecord::Type.register(:discount_line_type, DiscountLineType) | |
# discount_line_type.rb | |
class DiscountLineType < ActiveRecord::Type::Value | |
DISCOUNT_LINE = Struct.new(:name, :description, :amount, keyword_init: true) | |
def type | |
:jsonb | |
end |
I hereby claim:
- I am coralineada on github.
- I am coralineada13 (https://keybase.io/coralineada13) on keybase.
- I have a public key ASD295ulEpugWN5kKtqVHr0O9-ZZkgqzgXeJrNZCSsM2mgo
To claim this, I am signing this object:
find . -name .DS_Store -print0 | xargs -0 rm
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
# Put your .mid file in a "midi" directory next to this file. | |
# Then, in your terminal in the directory that this file is in: | |
# gem install midilib | |
# ruby ./midisort.rb | |
# The _sorted MIDI file is now in the "midi" directory. | |
require 'midilib' | |
sequence = MIDI::Sequence.new() |
OlderNewer