find . -name .DS_Store -print0 | xargs -0 rm
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:
# 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 |
p (1..100).map{|i| (i % 15 == 0 && "fizzbuzz") || (i % 3 == 0 && "fizz") || (i % 5 == 0 && "buzz") || i} * "," |
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 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.
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?
(begin | |
(send nil :require | |
(str "spec_helper")) | |
(block | |
(send nil :describe | |
(const nil :Project)) | |
(args) | |
(begin | |
(block | |
(send nil :describe |
alias gh='git config --get remote.origin.url | ruby -ne "puts %{https://github.com/#{\$_.split(/.com[\:\/]/)[-1].gsub(%{.git},%{})}}"| xargs open'
I have a relation like this:
context-[EXPRESSED_AS]->root
Assume that I have two contexts. The first has roots with base_forms of "temperature", "cool" and "hot". The second has roots with base_forms of "cool" and "hot". I want to find all contexts, sorted by the number of matches for the set ["cool", "temperature"].
I attempted it using this Cypher query, which doesn't work since the IN operator returns true or false instead of the matches:
"MATCH (w:`context`), s-[EXPRESSED_AS]->n1 WHERE n1.base_form in ["cool", "temperature"] WITH s, COUNT(n1.base_form in ["cool", "temperature"]) AS rootCount RETURN s.name, rootCount ORDER BY rootCount