Skip to content

Instantly share code, notes, and snippets.

Ruby: The future of frozen string literals

What is a literal?

In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.

Some examples:

7 # integer literal
@javier-menendez
javier-menendez / readme.md
Created February 29, 2024 04:07 — forked from acidtib/readme.md
kamal + github actions

Example of Kamal deployment from Github Actions.

Add your applications .env variables to the Github repo as a repository secret, you can find this under the repo settings => secrets and variables => actions

https://github.com/username/repo_name/settings/secrets/actions

you are going to need an ssh private key that your deployment server is aware of (add public key to servers .ssh/authorized_keys) and add the ssh private key as a repo secret

create action workflows

@javier-menendez
javier-menendez / sqlite3_disable_referential_to_rails_5.rb
Last active July 11, 2024 22:33
Rails 5 initializer for disable foreign keys during `alter_table` for sqlite3 adapter
require 'active_record/connection_adapters/sqlite3_adapter'
#
# Monkey-patch for disable foreign keys during `alter_table` for sqlite3 adapter for Rails 5
#
module ActiveRecord
module ConnectionAdapters
class SQLite3Adapter < AbstractAdapter