Skip to content

Instantly share code, notes, and snippets.

@jlntrt
jlntrt / installation.md
Created June 25, 2021 18:46
Installation steps for screego on uberspace 7

Installation steps for screengo on uberspace 7

@jlntrt
jlntrt / postgres_asdf_setup.sh
Last active May 13, 2021 17:05
Commands to run postgres with asdf on ubuntu
asdf plugin-add postgres
cpulimit -l 200 -f -- asdf install postgres latest
asdf global postgres 13.3
pg_ctl start
# 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)
@jlntrt
jlntrt / application_controller.rb
Created May 26, 2020 06:27
Server Side Tracking with Matomo and Rails
require 'net/http'
require 'uri'
class ApplicationController < ActionController::Base
after_action :track_request
private
def track_request
uri = URI('https://<matomo_url>/piwik.php')