This file contains hidden or 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
# Inspired by https://github.com/siro83/n8n-starter/blob/main/docker-compose.yml | |
networks: | |
n8n: | |
services: | |
n8n: | |
image: n8nio/n8n:latest | |
networks: ['n8n'] | |
environment: | |
- DB_TYPE=postgresdb |
This file contains hidden or 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
$darkmode: True; | |
$transparent: False; | |
$primary_paletteKeyColor: #d65d0e; // Orange pour les éléments principaux | |
$secondary_paletteKeyColor: #fabd2f; // Jaune pour les éléments secondaires | |
$tertiary_paletteKeyColor: #83a598; // Bleu pour les éléments tertiaires | |
$neutral_paletteKeyColor: #928374; // Gris pour les éléments neutres | |
$neutral_variant_paletteKeyColor: #7c6f64; // Gris foncé pour une variante neutre | |
$background: #282828; // Fond sombre Gruvbox |
This file contains hidden or 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
'HardWare': 'HI3516EV100_53H13L_FD_F4' | |
'SoftWareVersion': 'V4.03.R12.0002299E.12002.044602.0000000' |
This file contains hidden or 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
Benchmark.bm do |x| | |
count = 1_000_000 | |
label_size = 7 | |
array = [1, 2, 3, 4, 5, 'a', 'b'] | |
x.report "case when".rjust(label_size) do | |
count.times { | |
case array | |
when proc { |a| %w[a b] - array == [] } |
This file contains hidden or 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
Benchmark.bm do |x| | |
count = 100_000_000 | |
label_size = 7 | |
results = Potential.joins(:pro_choices).first.pro_choices.joins(:pro_account) | |
.preferred_or_exclusive | |
.pluck('potential_pro_choices.choice, pro_accounts.first_name') | |
.group_by(&:first) | |
x.report "reverse!:".rjust(label_size) do |
This file contains hidden or 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
def test | |
Benchmark.bm do |x| | |
count = 20 | |
label_size = 28 | |
x.report "without".rjust(label_size) do | |
count.times do | |
User.all.each(&:touch) | |
end | |
end |
This file contains hidden or 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 "benchmark" | |
Benchmark.bm do |x| | |
count = 10_000_000 | |
label_size = 7 | |
x.report "case when:".rjust(label_size) do | |
count.times { | |
variable = [:one, :two].sample | |
case variable |
This file contains hidden or 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
Benchmark.bm do |x| | |
count = 500 | |
label_size = 28 | |
x.report "maximum".rjust(label_size) do | |
count.times { CultivableZone.maximum(:integer) } | |
end | |
x.report "pluck.max".rjust(label_size) do | |
count.times { CultivableZone.pluck(:integer).max } |
This file contains hidden or 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 "benchmark" | |
Benchmark.bm do |x| | |
count = 5_000_000 | |
label_size = 7 | |
x.report "str +:".rjust(label_size) do | |
count.times { | |
"foo" + | |
"bar" |
This file contains hidden or 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 "benchmark" | |
require "active_support/all" | |
Benchmark.bm do |x| | |
count = 5_000_000 | |
label_size = 28 | |
x.report "1.week:".rjust(label_size) do | |
count.times { 1.week } | |
end |
NewerOlder