Some resources for people interested in hacking the CRuby (MRI) code base.
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
#!/bin/sh | |
print_usage() { | |
echo "usage: compress_video <input_file>" | |
echo "supported formats: mp4, webm, mkv, mov, avi, flv" | |
} | |
get_extension() { | |
f="${1##*/}" | |
case "$f" in |
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
require "rails_helper" | |
RSpec.describe "User management", type: :request do | |
# Runs in about 0.2 seconds (excluding file load time) | |
it "lists existing users" do | |
User.create!(name: "John", age: 30) | |
get users_path | |
expect(page).to have_table "Users" do |table| |
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
module EmbeddedRuby | |
module ErbRenderer | |
class Context | |
def initialize(variables) | |
variables.each do |key, value| | |
instance_variable_set(:"@#{key}", value) | |
self.class.attr_reader key | |
end | |
end |
title | teaser | author |
---|---|---|
Trabalhar no meu idioma nativo requer empatia |
É exaustivo passar o dia todo se comunicando em um idioma que não é o nativo, mas podemos praticar a gentileza e a compreensão para aliviar parte dessa carga mental.
|
Matheus Richard |
Algumas semanas atrás, eu estava conversando com um colega de trabalho e
I hereby claim:
- I am matheusrich on github.
- I am matheusrich (https://keybase.io/matheusrich) on keybase.
- I have a public key ASADwR7uoK7Vh1ejTiSySqkdoNSUqlQMVaK5cijh0IQdFwo
To claim this, I am signing this object:
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
require 'bundler/inline' | |
gemfile do | |
source 'http://rubygems.org' | |
gem 'benchable' | |
gem 'rails' | |
gem 'erubi' | |
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
macro define_option_property(*options) | |
{% for option in options %} | |
def {{option.id}}? | |
@options[:{{option}}] | |
end | |
{% end %} | |
end | |
class CLI | |
OPTIONS = { |
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
RSpec.configure do |config| | |
config.register_ordering(:global) do |items| | |
items.sort_by { |item| -File.mtime(item.metadata[:absolute_file_path]).to_i } | |
end | |
end |
[Gem-web][gem-web] is a tool that capable of providing an interface that allows opening documentation, source code, and website of a ruby gem. My goal on GSoC was integrating it on RubyGems' CLI, which would make this feature available out of the box to all ruby users, improving their productivity, since there would have no need to search this information manually.
NewerOlder