Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
brew install openssl
lt: | |
devise: | |
confirmations: | |
confirmed: "Jūsų el. pašto adresas sėkmingai patvirtintas." | |
send_instructions: "Už kelių minučių el. paštu gausite instrukcijas, kaip patvirtinti savo vartotoją." | |
send_paranoid_instructions: "Jei jūsų el. pašto adresas yra mūsų duomenų bazėje, kelių minučių bėgyje gausite laišką su patvirtinimo instrukcijomis." | |
failure: | |
already_authenticated: "Jūs jau esate prisijungęs." | |
inactive: "Jūsų vartotojas dar nepatvirtintas." | |
invalid: "Neteisingas el. paštas arba slaptažodis." |
# === Terminal.app === # | |
# Open new tab in terminal. | |
exec("osascript -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' > /dev/null 2>&1 ") | |
# Open directory | |
exec("osascript -e 'tell application \"Terminal\" to do script \"cd directory\" in selected tab of the front window' > /dev/null 2>&1 ") | |
# Open directory in new tab (this is better) | |
exec("osascript -e 'tell application \"Terminal\"' -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' -e 'do script with command \"cd directory && clear\" in selected tab of the front window' -e 'end tell' > /dev/null 2>&1") |
require 'benchmark' | |
def print_memory_usage | |
memory_before = `ps -o rss= -p #{Process.pid}`.to_i | |
yield | |
memory_after = `ps -o rss= -p #{Process.pid}`.to_i | |
puts "Memory: #{((memory_after - memory_before) / 1024.0).round(2)} MB" | |
end |
I hereby claim:
To claim this, I am signing this object:
# -*- encoding : utf-8 -*- | |
set :assets_dependencies, %w(app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb) | |
namespace :deploy do | |
namespace :assets do | |
desc <<-DESC | |
Run the asset precompilation rake task. You can specify the full path \ | |
to the rake executable by setting the rake variable. You can also \ |
lt: | |
admin: | |
js: | |
true: Taip | |
false: Ne | |
is_present: Is present | |
is_blank: Is blank | |
date: Data ... | |
between_and_: Tarp ... ir ... | |
today: Today |
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
load 'deploy/assets' | |
Dir['config/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' |
require 'resque/errors' | |
class DatabaseBackupJob | |
def self.perform(id, foo, bar) | |
# do backup work | |
rescue Resque::TermException | |
# write failure to database | |
# re-enqueue the job so the job won't be lost when scaling down. | |
Resque.enqueue(DatabaseBackupJob, id, foo, bar) |
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the path: |