Skip to content

Instantly share code, notes, and snippets.

View matiasmasca's full-sized avatar
馃彔
Moving to Gitlab.com

Mat铆as Mascazzini matiasmasca

馃彔
Moving to Gitlab.com
View GitHub Profile
@matiasmasca
matiasmasca / robots.txt
Created May 17, 2017 20:17
un ejemplo de Robots.txt para WordPress
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /xmlrpc.php
Allow: /wp-admin/admin-ajax.php
User-agent: *
User-agent: Mediapartners-Google*
Disallow: /temp/
@matiasmasca
matiasmasca / 00.md
Created November 15, 2017 19:24 — forked from maxivak/00.md
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

111mil.mumuki.io,
alcal-prog1.mumuki.io,
alcal-prog2.mumuki.io,
alcal-prog3.mumuki.io,
alcal.mumuki.io,
algo1-unsam.mumuki.io,
algo2-undav.mumuki.io,
apuntesmdp.mumuki.io,
ayedea.mumuki.io,
base.mumuki.io,
@matiasmasca
matiasmasca / .rubocop.yml
Created October 16, 2018 13:26
Rubocop Config - ajustada
# Reference:
# https://github.com/bbatsov/rubocop/blob/v0.33.0/config/default.yml
# https://github.com/bbatsov/rubocop/blob/v0.33.0/config/enabled.yml
# https://github.com/bbatsov/rubocop/blob/v0.33.0/config/enabled.yml
# Many of the variations are because rubocop prefers things to look like:
# foo = foo(a,
# b
# )
#
@matiasmasca
matiasmasca / db.rake
Created April 6, 2019 19:58 — forked from khalilgharbaoui/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90
# Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6
# Benefits of: https://gist.github.com/e12e/e0c7d2cc1d30d18c8050b309a43450ac
# And fixes of: https://gist.github.com/joelvh/f50b8462611573cf9015e17d491a8a92
namespace :db do
desc 'Dumps the database to backups'
task dump: :environment do
dump_fmt = ensure_format(ENV['format'])
dump_sfx = suffix_for_format(dump_fmt)
backup_dir = backup_directory(Rails.env, create: true)
@matiasmasca
matiasmasca / instalar_wordpress_por_consola.txt
Last active May 12, 2020 20:59
Instalar WordPress desde Terminal de Linux por SSH
# 1. Iniciar sesi贸n por SSH.
# algunos proveedores usan el mismo usuario de FTP para habilitar el acceso SSH.
$ ssh usuario@host
# 2. Posicionarte en la carpeta donde vas a instalar.
# trata de estar en la carpeta donde vas a instalar, o donde tengas permiso de escribir.
$ cd
# 3. Copiar la versi贸n de wordpress.
# conseguir el link de la version que queres instalar,
@matiasmasca
matiasmasca / limpiar versiones del Kernel de Linux
Created July 5, 2020 22:15
驴C贸mo limpiar versiones viejas del Kernel de Linux?
驴C贸mo limpiar versiones viejas del Kernel de Linux?
Como usuario novato de linux me encontr茅 que mi partici贸n de arranque /boot de 400megas estaba re-llena, pero de que? ni idea.
Publique mi problema en StackOverflow, y un alma caritativa me dio la soluci贸n correcta. Ahora esta posteada aqu铆:
http://superuser.com/questions/1144753/how-to-clean-the-boot-directory-on-linux-mint/1145020#1145020
Todav铆a no s茅 si es seguro hacerlo, pero estoy borrando las versiones mas antiguas.
Listar versiones del kernel
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@matiasmasca
matiasmasca / capybara cheat sheet
Created November 2, 2020 17:22 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@matiasmasca
matiasmasca / clean-up-boot-partition-ubuntu.md
Created March 2, 2021 20:44 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r