# Anchor
click_link 'Save'
# Button
click_button 'awesome'
# Both above
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
# -*- 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: |
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
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 |
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
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 \ |
$ uname -r
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
=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') |
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 '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 |
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
¿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 |
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
# 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, |
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
# 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) |
NewerOlder