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
$ cat /tmp/ruby-build.20220923165340.2544.hqIt35/ruby-3.1.2/ext/openssl/mkmf.log | |
=== OpenSSL for Ruby configurator === | |
have_func: checking for rb_io_maybe_wait()... -------------------- yes | |
LD_LIBRARY_PATH=.:../.. "gcc -o conftest -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/openssl -I/home/deploy/.rbenv/versions/3.1.2/include -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC conftest.c -L. -L../.. -L. -L/home/deploy/.rbenv/versions/3.1.2/lib -fstack-protector |
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
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus | |
HOME=/home/deploy | |
HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar | |
HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew | |
HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew | |
INFOPATH=/home/linuxbrew/.linuxbrew/share/info: | |
LANG=C.UTF-8 | |
LC_TERMINAL=iTerm2 | |
LC_TERMINAL_VERSION=3.4.16 | |
LESSCLOSE=/usr/bin/lesspipe %s %s |
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
/tmp/ruby-build.20220923165340.2544.hqIt35 ~ | |
/tmp/ruby-build.20220923165340.2544.hqIt35/ruby-3.1.2 /tmp/ruby-build.20220923165340.2544.hqIt35 ~ | |
checking for ruby... /home/deploy/.rbenv/shims/ruby | |
tool/config.guess already exists | |
tool/config.sub already exists | |
checking build system type... x86_64-pc-linux-gnu | |
checking host system type... x86_64-pc-linux-gnu | |
checking target system type... x86_64-pc-linux-gnu | |
checking for gcc... gcc | |
checking for ld... ld |
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 Array | |
def pluck(*args) | |
self.map { |item| args.map { |arg| item[arg] || item[arg.to_sym] || item[arg.to_s]}.flatten } | |
end | |
end | |
# Example: | |
# data = [ { "name" => "Cookie Monster", "color" => "blue", "id" => "1" }, | |
# { "name" => "Kermit the Frog", "color" => "green", "id" => "2" } | |
# { "name" => "Big Bird", "color" => "blue", "id" => "3" } |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>My Page</title> | |
</head> | |
<body> | |
<h1>Hello!</h1> | |
<p> |
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
# This script generates unified CHANGELOG output in Markdown | |
# of all Rails changes between two versions of Rails. | |
# | |
# By default, it shows the latest changes in the specified version only. | |
# | |
# You can also pass the "since earlier" version you're interested in. | |
# | |
# Usage: ruby rails_changes.rb {latest_version} [since_version] | |
# | |
# Examples: |
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
# This is pseudocode. Adapted from https://en.wikipedia.org/wiki/Producer%E2%80%93consumer_problem | |
# | |
# Currrent design: | |
# | |
# A producer places items into a queue. | |
# A consumer removes items from the queue. | |
# | |
# 1. If the queue becomes empty, the consumer sleeps; until woken up later. | |
# 2. If the queue becomes one-more-than-empty, the producer wakes up the consumer. | |
# 3. If the queue becomes full, the producer sleeps; until woken up later. |
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
Product | |
sku: text | |
title: text | |
price: integer | |
Review | |
product_id: integer | |
rating: integer | |
content: text | |
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
Rails.application.routes.draw do | |
get "/" => 'products#index' | |
get "/products" => 'products#index' | |
get "/products/:id" => 'products#show' | |
get "/products/create" => 'products#create' | |
get "/reviews" => 'reviews#index' | |
get "/reviews/create" => 'reviews#create' |
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
# To use this script: | |
# gem install listen | |
# gem install colorize | |
# | |
# then | |
# | |
# ruby watch.rb [path] | |
# | |
# [path] defaults to ".git" | |
# |
NewerOlder