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
# This file is used by Rack-based servers to start the application. | |
require ::File.expand_path('config/environment', __dir__) | |
map "/health" do | |
run Rack::HealthCheck.new | |
end | |
run Rails.application |
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 | |
echo -e "This script will generate a new ssh-key without an passphrase.\n" | |
echo -e "\nEnter the desired e-mail:" | |
read -p "E-mail: " EMAIL | |
echo -e "\n Enter a key name (will be saved on $HOME/.ssh/):" | |
read -p "Key: " 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
#!/usr/bin/env ruby | |
require 'csv' | |
require 'json' | |
if ARGV.size != 2 | |
puts 'Usage: csv_to_json input_file.csv output_file.json' | |
puts 'This script uses the first line of the csv file as the keys for the JSON properties of the objects' | |
exit(1) | |
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
pt-BR: | |
errors: | |
messages: | |
invalid_date: 'não é uma data válida' | |
invalid_time: 'não é um horário válido' | |
invalid_datetime: 'não é um horário com data válido' | |
is_at: 'deve ser em %{restriction}' | |
before: 'deve ser antes de %{restriction}' | |
on_or_before: 'deve ser antes ou em %{restriction}' | |
after: 'deve ser após %{restriction}' |
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 | |
# | |
# install into git dir: | |
# curl \ | |
# -fSL https://gist.githubusercontent.com/ppdeassis/48387d9f49b41af23e7d/raw/e1b6a2d4c9257ed6eecefedebeafa3655c98bb7a/pre-commit \ | |
# -o .git/hooks/pre-commit \ | |
# && chmod +x .git/hooks/pre-commit | |
# | |
#!/bin/bash |
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
`ORA-12526, TNS:listener: all appropriate instances are in restricted mode.` | |
As a workaround, connect on the docker container | |
docker exec -it --user=oracle ${oracle_image_name} bash | |
and disable the restricted sessions setting | |
sqlplus /nolog | |
conn sys as sysdba | |
password: oracle |
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
require "prawn" | |
module Prawn | |
module Graphics | |
def stroke_grid(options = {}) | |
options = { | |
:at => [0, 0], | |
:height => bounds.height.to_i - (options[:at] || [0, 0])[1], | |
:width => bounds.width.to_i - (options[:at] || [0, 0])[0], | |
:step_length => 50, |
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8 gem install therubyracer -- --with-v8-dir=/usr/local/opt/[email protected]
bundle install
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/64555220bfbf4a25598523c2e4d3a232560eaad7/Formula/openssl.rb -f
This should install openssl in /usr/local/opt/openssl
If you already have 1.1 installed, you should have 2 versions of opensll in: /user/local/opt/