Skip to content

Instantly share code, notes, and snippets.

View iwan's full-sized avatar

Iwan Buetti iwan

  • Milano, Italy
View GitHub Profile
This file has been truncated, but you can view the full file.
; Italian.ini - Italian translation REDCap 10.8.4 standard release enrico.nicolis@marionegri.it 15-mar-2021
alerts_01 = "Le impostazioni seguenti possono essere utilizzate come limitazione per gli utenti di inviare avvisi a determinati indirizzi e-mail, nella pagina Avvisi e notifiche in tutti i progetti. Ciò consente ad alcune istituzioni di essere più restrittive se hanno dubbi sugli utenti che utilizzano questa funzionalità ( involontariamente o intenzionalmente) in un modo che potrebbe minacciare la conformità alle normative o le leggi / regolamenti sulla privacy, come il convogliamento di dati sensibili nel messaggio di posta elettronica di un avviso e l'invio a un utente non del progetto ".
alerts_02 = "Consenti agli utenti normali di inserire manualmente gli indirizzi email come <u> testo in formato libero </u> per un avviso A, CC o BCC?"
alerts_03 = "Consentire agli utenti normali di utilizzare variabili di progetto per <u> campi di posta elettronica </u> nel progetto per A, CC o BCC di un avviso?"
@iwan
iwan / update_translations.rb
Last active February 22, 2022 15:51
Update an outdated existing translation (here in italian) to a base file in english language
en_filename = "English.ini" # located in redcap/redcap_vxx.x.x/LanguageUpdater/ folder
it_filename = "Italian_v10_8_4 3.ini" # an existing but outdated file with translations
def read_file(filename)
hash = {}
count = 0
key = ""
value = ""
IO.readlines(filename, chomp: true).each do |line|
@iwan
iwan / Italian_v11_0_1.ini
Last active February 22, 2022 15:43
Italian translations for REDCap. v11.0.1 (based on Italian.ini - Italian translation REDCap 10.8.4 standard release by enrico.nicolis@marionegri.it 15-mar-2021))
period = "."
colon = ":"
questionmark = "?"
exclamationpoint = "!"
comma = ","
leftparen = "("
rightparen = ")"
global_01 = "Errore"
global_02 = "Nota"
@iwan
iwan / cinque_province_senza_id.geojson
Created February 18, 2019 11:59
Cinque province italiane (senza id)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iwan
iwan / cinque_province.geojson
Last active February 18, 2019 11:57
Cinque province italiane (con id)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iwan
iwan / province.geojson
Last active February 18, 2019 13:18 — forked from davidejmancino/province.geojson
Confini amministrativi delle province italiane
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iwan
iwan / prime.ex
Created July 9, 2018 10:25
Primality test in Elixir - a simple method
defmodule Prime do
# https://en.wikipedia.org/wiki/Primality_test#Simple_methods
def is_prime(0) do
false
end
def is_prime(1) do
false
end
module ExcelColumnsConverions
# convert the column name ("A", "ACB", ...) to an number (1-based)
def excel_col_number(str)
offset = 'A'.ord - 1
str.chars.inject(0){ |x,c| x*26 + c.ord - offset }.to_i
end
# convert the column number to a string ("A", "ACB", ...)
def excel_col_string(number)
@iwan
iwan / rand_string_generator.rb
Created May 23, 2018 15:21
Random string generator
def random_string(length=16)
source = ("a".."z").to_a + ("A".."Z").to_a + (0..9).to_a
Array.new(length){|e| source[rand(source.size)]}.join
end
@iwan
iwan / elixir_phoenix_notes.md
Created April 4, 2018 12:33 — forked from hmans/elixir_phoenix_notes.md
Notes on learning Elixir and Phoenix

Notes on learning Elixir and Phoenix

Just some assorted notes I've made while digging into Phoenix, Elixir and friends. I'm coming from a strong Rails background, so many of these will refer to features from that framework.

Views / Templates

Biggest difference from Rails?

Unlike Rails, where rendering is almost always performed by a template file, the responsibility of rendering a response in Phoenix lies with a view module (that typically corresponds to the current controller module.) This view module will typically offer a whole bunch of render functions (matching different parameters, first and foremost the template name.) Templates (found in web/templates/) will directly compile into such functions.