Skip to content

Instantly share code, notes, and snippets.

View belguzmani's full-sized avatar

Bel Guzman belguzmani

View GitHub Profile
@belguzmani
belguzmani / fix-libv8-mac.txt
Created October 4, 2022 23:51 — forked from fernandoaleman/fix-libv8-mac.txt
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
@belguzmani
belguzmani / gist:bbcfb77ee3542e3f7aae7c89252c569e
Created November 3, 2021 17:01 — forked from Irio/gist:1496746
Solution for "cannot load such file -- openssl" on RVM
When I tried run "rake test", I received:
rake aborted!
cannot load such file -- openssl
Tasks: TOP => test:units => test:prepare => db:test:prepare => db:abort_if_pending_migrations => environment
(See full trace by running task with --trace)
@belguzmani
belguzmani / Gemfile
Created June 25, 2020 16:27 — forked from dhh/Gemfile
HEY's Gemfile
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
@belguzmani
belguzmani / yummmly-metadata.md
Last active January 14, 2019 02:57
Yummly Metadata

Reference: https://developer.yummly.com/documentation

Cuisines (table)

set_metadata('cuisine', [{"id":"cuisine-american","name":"American","type":"cuisine","description":"American","searchValue":"cuisine^cuisine-american","localesAvailableIn":["en-US"]},{"id":"cuisine-kid-friendly","name":"Kid-Friendly","type":"cuisine","description":"Kid-Friendly","searchValue":"cuisine^cuisine-kid-friendly","localesAvailableIn":["en-US"]},{"id":"cuisine-italian","name":"Italian","type":"cuisine","description":"Italian","searchValue":"cuisine^cuisine-italian","localesAvailableIn":["en-US"]},{"id":"cuisine-asian","name":"Asian","type":"cuisine","description":"Asian","searchValue":"cuisine^cuisine-asian","localesAvailableIn":["en-US"]},{"id":"cuisine-mexican","name":"Mexican","type":"cuisine","description":"Mexican","searchValue":"cuisine^cuisine-mexican","localesAvailableIn":["en-US"]},{"id":"cuisine-southern","name":"Southern & Soul Food","type":"cuisine","description":"Southern & Soul Food","searchValue":"cuisine^c
[
[ 0] [
[0] "Westwood Elementary School",
[1] "John Ruiz",
[2] "f94b6596"
],
[ 1] [
[0] "Westwood Elementary School",
[1] "Adrian Petrucci",
[2] "2b8d5d80"
@belguzmani
belguzmani / communities
Created October 16, 2018 03:22
List of classrooms.
[
[ 0] [
[0] "Westwood Elementary School",
[1] "Kindergarten 1 - 2018-2019",
[2] "1568f433"
],
[ 1] [
[0] "Westwood Elementary School",
[1] "Kinder Garden 2 - 2018-2019",
[2] "06c82c3a"
@belguzmani
belguzmani / forms.rb
Last active March 14, 2017 00:17
Forms modeling
Rspec.describe Form, type: :model do
it { is_expected.to belong_to(:user) }
it { is_expected.to have_field(:title) }
it { is_expected.to have_field(:require_signature) }
it { is_expected.to have_many(:form_shares) }
end
RSpec.describe FormShare, type: :model do
it { is_expected.to belong_to(:form) }
RSpec.describe InvestmentType, type: :model do
subject { create :investment_type }
it { is_expected.to have_attributes(name: 'Real Estate') }
end
RSpec.describe ComplianceItems, type: :model do
context 'no parents' do
subject { create :compliance_item }
class Person
include Mongoid::Document
field :email, type: String
field :month, type: Date
field :monthly_total, type: Hash, default: {:email_open => 0, :email_click => 0, :page_view => 0}
has_many :monthly_events
end
class MonthlyEvent