Skip to content

Instantly share code, notes, and snippets.

View seguelador's full-sized avatar
馃彔
Working from home

Matias Seguel seguelador

馃彔
Working from home
  • Mercado Libre
  • Chile
View GitHub Profile
@seguelador
seguelador / change_wordpress_domain.md
Created August 21, 2018 11:26 — forked from jaircuevajunior/change_wordpress_domain.md
Change/Migrate wordpress domain in MySQL

Find/Replace within dump method

This is a very simple method, and for me (as a SysAdmin) it's very practical as I usually make things through SSH terminal.

It's important to say that everything (including text inside posts) that matches the find string WILL BE REPLACED!

For me it's never been a problem so far, but one never knows

First we generate the dump itself, for example:

mysqldump -umyuser -pmypass mydatabase > mydumpfile.sql
@seguelador
seguelador / ActiveRecord_transaction.rb
Created August 20, 2020 23:32
Ejemplo de como utilizar un Active Record Transaction
# Save scheduling distribution for a campaign
def self.save_distribution params
transaction_ok = true
begin
Scheduling.transaction do
# Get campaign and company working week days
campaign = Campaign.find(params[:campaign][:id])
company_wwd = campaign.company.working_week_days
# Si no eligi贸 ning煤n d铆a laboral, se distribuye a cualquier d铆a
company_wwd = Hash[WORKING_WEEK_DAYS.collect { |wd| [wd, true] }] if company_wwd.values.uniq.length == 1 && !company_wwd.values.uniq.first

Powerlevel10k can generate the same prompt as Pure.

pure

Installation

git clone https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
es-CL:
devise:
confirmations:
confirmed: "Tu cuenta ya ha sido confirmada."
confirmed_and_signed_in: "Tu cuenta ya ha sido confirmada. Has sido identificado autom谩ticamente."
send_instructions: "Recibir谩s un correo electr贸nico en unos minutos con instrucciones sobre c贸mo restablecer tu contrase帽a."
send_paranoid_instructions: "Si tu correo electr贸nico existe en nuestra base de datos recibir谩s un correo electr贸nico en unos minutos con instrucciones sobre c贸mo reiniciar tu contrase帽a."
new:
resend_confirmation_instructions: Reenviar instrucciones de confirmaci贸n