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 / amazonctl.py
Created February 20, 2024 13:59 — forked from jtpaasch/amazonctl.py
A collection of functions commonly used to do AWS stuff.
# -*- coding: utf-8 -*-
"""A simple tool to document how to control AWS resources.
AWS AUTHENTICATION
-------------------
In order to run any of the code below, you need a profile with AWS credentials
set up on your computer. It's very easy to do this. Google how to configure
your profile with boto3, or visit the docs:
@matiasmasca
matiasmasca / puma-https-local.rb
Created January 28, 2024 20:12 — forked from etozzato/puma.rb
A section of config/puma.rb that will automatically generate a self-signed X509 certificate and provide https in development
if Rails.env.development?
FileUtils.mkdir_p(Rails.root.join('config', 'certs'))
key_path = Rails.root.join('config', 'certs', 'development.key')
crt_path = Rails.root.join('config', 'certs', 'development.crt')
unless File.exist?(key_path) && File.exist?(crt_path)
def cert_domain
'localhost' # Setting[:cookie_domain] || 'localhost'
end
@matiasmasca
matiasmasca / EMACS guía de supervivencia rápida.md
Last active December 20, 2023 11:00
Comandos necesarios para sobrevivir en el primer uso de EMACS

¿Nuevo/a en EMACS? yo también y eso que estaba acá antes que nosotros nacieramos. Pongamos aca los comandos necesarios para poder usarlo a la primera desde una computadora normal (linux, windows). Anda soltando el mouse, esto esta pensado para manejarse solo con teclado.

Combinaciones de teclas.

[C- ] CTRL+ tecla, se escribe: C-tecla
[M- ] ALT+ tecla, se escribe: M-tecla para los EMACS commands.
[C-tecla tecla] CTRL+tecla tecla: control+tecla, soltar y presionar tecla que sigue.
[RET]: tecla ENTER (retorno de carro). Tambien con: C-m
[C-i]: tecla TAB.

C-[ : tecla ESC.

@matiasmasca
matiasmasca / Dockerfile
Created August 29, 2023 16:51
WIP install Chrome and ChromeDrive on Docker / debian
FROM dev as test
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
wget \
unzip \
apt-utils \
libasound2 \
libatk1.0-0 \
@matiasmasca
matiasmasca / Capybara.md
Created May 27, 2021 12:29 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
@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 
@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')
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 / 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
@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,