Skip to content

Instantly share code, notes, and snippets.

View rikas's full-sized avatar
🏠
Working from home

Ricardo Otero rikas

🏠
Working from home
View GitHub Profile
@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active February 7, 2024 19:19
Install mysql2 on MacOS Mojave

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@lmmendes
lmmendes / 003-mongo-retry.rb
Created May 24, 2015 10:03
Monkey patch for Mongoid 4.x "Could not connect to a primary node for replica set"
#==================================================================================================
# Monkey Patch (lmmendes)
# MongoDB or in this case Mongoid and it's driver Moped have problems running some commands
# when the Primary node goes down and Moped tries to write to the database before
# refreshing the cluster info or at least trying the same command on each node before failing.
# From GitHub:
# Moped::Errors::ConnectionFailure: Could not connect to a primary node for replica set
# https://github.com/mongoid/moped/issues/348
#==================================================================================================
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@codespore
codespore / Active_Admin_Cheats.rb
Last active August 30, 2022 14:17
Quick reference to useful ActiveAdmin customizations
# Add Action button on the top navigation menu. Useful for resource with nested resources
action_item :only => :show do
link_to('Show Users', admin_group_users_path(resource))
end
# Custom show page with children items
show do