Skip to content

Instantly share code, notes, and snippets.

Diego Algorta oboxodo

Block or report user

Report or block oboxodo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oboxodo
oboxodo / convert-headings.js
Created Jun 22, 2015
Learning to write some pandoc.org filters
View convert-headings.js
#!/usr/bin/env node
// Pandoc filter to convert first Para on each OrderedList item into a heading of the appropriate level.
'use strict';
var pandoc = require('pandoc-filter');
var HEADER_LEVELS = {
'UpperRoman': 1,
'UpperAlpha': 2,
@oboxodo
oboxodo / cursor-based-pagination-mvp.patch
Created Jan 28, 2017
MVP for adding cursor based pagination to an scaffolded Rails blog
View cursor-based-pagination-mvp.patch
commit 3babf31134cafb211041202d19fa6f5a9359aed1
Author: Diego Algorta <diego@oboxodo.com>
Date: Sat Jan 28 15:59:06 2017 -0300
Add cursor based pagination
diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb
index 16bba99..a921aff 100644
--- a/app/controllers/posts_controller.rb
+++ b/app/controllers/posts_controller.rb
@oboxodo
oboxodo / main.rb
Last active Feb 22, 2018 — forked from coorasse/main.rb
CanCanCan Issue #485
View main.rb
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', '5.0.6'
@oboxodo
oboxodo / brite_verify.rb
Last active Jan 17, 2019
BriteVerify simple email validation client supporting configurable timeouts
View brite_verify.rb
class BriteVerify
require "json"
require "faraday"
URL = "https://bpi.briteverify.com"
PATH = "/emails.json"
DEFAULT_TIMEOUT = 1.freeze
class Error < StandardError; end
View rollbar-rql.sql
-- Trying to get similar info that can be get from https://rollbar.com/quimbee/quimbee/versions/
-- but based on a custom attribute instead of the `code_version`.
-- Still not there.
SELECT body.trace.extra.code_version_release_iteration, max(timestamp), count_distinct(item.counter), count(*)
FROM item_occurrence
WHERE item.environment = "production"
AND item.level >= 30
GROUP BY 1
ORDER BY 2 DESC
LIMIT 20
@oboxodo
oboxodo / README.md
Last active Jun 8, 2019
Solano CI hook scripts for CodeClimate's coverage test-reporter supporting parallel builds
View README.md

This is an example for running Code Climate Test Reporter in Solano CI (ex-TDDIUM).

This example is particular for SimpleCov and Amazon's AWS but it should still be a good template for other coverage tools and cloud storage providers.

For these scripts to work you'll need to set 3 ENV vars in Solano CI:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • CC_TEST_REPORTER_ID
You can’t perform that action at this time.