Skip to content

Instantly share code, notes, and snippets.

View renato-zannon's full-sized avatar

Renato Zannon renato-zannon

View GitHub Profile
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
store: Ember.inject.service(),
actions: {
createClosing() {
const closing = this.get('store').createRecord('closing');
this.set('closing', closing);
@renato-zannon
renato-zannon / patch.rb
Created March 20, 2014 19:21
Fix rails 2.3 filter_parameter_logging for ruby 2.x
# The filter_parameter_logging method, used to filter request parameters
# (such as passwords) from the log, defines a protected method called
# filter_parameter when called. Its existence is later tested using
# respond_to?, without the include_private parameter. Due to the respond_to?
# behavior change, the method existence is never detected, and parameter
# filtering stops working.
require 'action_controller'
module ParameterFilterPatch
def respond_to?(method, include_private = false)
@renato-zannon
renato-zannon / README.md
Last active October 1, 2021 21:05
Verify if host will have Let's encrypt certificate validation problems

Running the script inside a docker container

If you wish to test whether your docker container won't have issues when the old Root certificate expires, you can run the script inside the container itself.

In order to do this, follow these steps:

  1. Download the verify-lets-encrypt.sh script from the gist
  2. Bring up your application container as you usually do - with docker-compose up, docker run, via VS Code etc
  3. Run docker ps, and look for any application containers that are up; the NAMES column is the easiest for that
  4. From the same folder where you've downloaded the script, run docker exec -i /bin/sh < verify-lets-encrypt.sh; this will run the script inside the container