Skip to content

Instantly share code, notes, and snippets.

@brenes
brenes / application.html.erb
Created November 20, 2017 08:33 — forked from Dagnan/application.html.erb
Inline CSS or JS in Rails 5
<!DOCTYPE html>
<html>
<head>
<%= inline_js 'application.js' %>
<%= inline_css 'application.css' %>
</head>
<body>
</body>
</html>
@brenes
brenes / gemas.org
Last active April 3, 2019 14:54
ideas charlas

Formación de crear gemas

¿Qué es una gema?

  • Librería de código
  • Relación con los proyectos
  • ¿Porqué trabajar con gemas?
@brenes
brenes / pagespeed_code.gs
Last active December 29, 2022 16:23
Page SPeed monitorization through Google Spreadsheet
// This script is based on https://ithoughthecamewithyou.com/post/automate-google-pagespeed-insights-with-apps-script
// STEP 0: Create a spreadsheet document on Google Drive, go to the code editor
// (in spanish "Editor de la secuencia de comandos").
// Then paste this code and modify it.
// STEP 1: Insert your pagespeed API KEY
var pageSpeedApiKey = '';
// STEP 2: Insert the monitored URL
@brenes
brenes / README.md
Last active June 29, 2020 11:23
ActiveRecord PostgreSQL adapter extension to deal with the Aurora Serverless hanging issue.

There's an issue reported in ruby-pg (ged/ruby-pg#325) where a query hangs and never return results to the application.

This adapter extension controls it with a ruby timeout set to 5 seconds. If the query doesn't return results in 5 seconds it aborts the async_exec method and tries the exec one.

We're not proud of this vut it saved a lot of erratic errors.