This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asdf plugin-add postgres | |
cpulimit -l 200 -f -- asdf install postgres latest | |
asdf global postgres 13.3 | |
pg_ctl start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The SMScarrier breaks if a message is longer than > 160 characters. | |
# Every message the SMScarrier sends should also have a suffix: " - message X of Y" | |
# Instead of using SMScarrier, you can just output the messages to STDOUT | |
def send_sms_message(text, to, from) | |
deliver_message_via_carrier(text, to, from) | |
end | |
def deliver_message_via_carrier(text, to, from) | |
SMScarrier.deliver(text, to, from) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'uri' | |
class ApplicationController < ActionController::Base | |
after_action :track_request | |
private | |
def track_request | |
uri = URI('https://<matomo_url>/piwik.php') |