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
import i18next from "i18next"; | |
import { i18n as nexti18next } from "next-i18next"; | |
import { serverSideTranslations } from "next-i18next/serverSideTranslations"; | |
export class TranslationService { | |
static translate = async ( | |
key: string, | |
ns: string, | |
lng: string, | |
args: { [s: string]: string } = {} |
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
#!/bin/bash | |
CLASSIC_SNAPS=( | |
code | |
heroku | |
hub | |
skype | |
slack | |
) |
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
#!/bin/sh | |
# Install: | |
# sh -c "$(curl -fsSL https://gist.githubusercontent.com/michaeldever/4be94b7dac9add53cc2025522d620ec7/raw/1297ba9b60542e5dd70ab107951ce1c2fac94185/install.sh)" | |
# References: | |
# https://gist.github.com/bradp/bea76b16d3325f5c47d4 | |
# https://gist.github.com/CliffordAnderson/817777b5dc0e67769e4b | |
# https://gist.github.com/codeinthehole/26b37efa67041e1307db | |
# https://github.com/thoughtbot/laptop/blob/master/mac |
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
#!/usr/bin/env ruby | |
ENV['RAILS_ENV'] ||= 'development' | |
require_relative '../config/environment' | |
include RabbitMqHelper | |
def files_to_reopen | |
@files_to_reopen ||= [] |
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
module RabbitMqHelper | |
def handle_subscription | |
connection = Bunny.new(ENV.fetch('MQ_URL')) | |
connection.start | |
channel = connection.create_channel | |
exchange = channel.topic(ENV.fetch('MQ_EXCHANGE'), durable: true) | |
queue = channel.queue(ENV.fetch('MQ_QUEUE'), durable: true) | |
.bind(exchange, routing_key: ENV.fetch('MQ_ROUTING_KEY')) |
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
rabbit_mq: ./lib/rabbit_mq_handler.rb run |
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
def establish_active_record_connection | |
defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection | |
end | |
Daemons.run_proc('rabbit_mq', multiple: false, backtrace: true, log_output: true) do | |
begin | |
establish_active_record_connection | |
rescue StandardError => e | |
puts e.message | |
puts e.backtrace |
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
Daemons.run_proc(options) do | |
begin | |
# NOTE: Ensure we have a database connection | |
defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection | |
rescue StandardError => e | |
puts e.message | |
puts e.backtrace | |
end | |
end |
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
#!/usr/bin/env ruby | |
ENV['RAILS_ENV'] ||= 'development' | |
require_relative '../config/environment' | |
def files_to_reopen | |
@files_to_reopen ||= [] | |
end |
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
#!/usr/bin/env ruby | |
ENV['RAILS_ENV'] ||= 'development' | |
require_relative '../config/environment' | |
def files_to_reopen | |
@files_to_reopen ||= [] | |
end |
NewerOlder