Skip to content

Instantly share code, notes, and snippets.

Jordano Moscoso Xosmond

Block or report user

Report or block Xosmond

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Xosmond / Procfile
Last active Dec 18, 2018
vuerails procfile
View Procfile
web: rails s
webpack: bin/webpack-dev-server
Xosmond / login.vue
Created Dec 13, 2018
vuerails login vue component
View login.vue
<style scoped>
.login-footer {
background-color: #e6e6e6;
<div class="bg-white rounded text-wktext">
<form :action="action" method="post">
<div class="rounded-t py-4 px-5 bg-blue">
<span class="text-base text-white text-wktext-bold">Welcome, please login</span>
Xosmond / home_controller.rb
Last active Dec 18, 2018
vuerails home_controller
View home_controller.rb
class HomeController < ApplicationController
before_action :authenticate_user!
def index
Xosmond / application.scss
Last active Dec 16, 2018
vuerails application.scss
View application.scss
@charset "utf-8";
// Material design input
.material-input {
label {
color: #3490dc;
transition:0.2s ease all;
Xosmond / some.component.html
Created May 24, 2018
Replace iframe url - Angular
View some.component.html
<iframe src="oldurl" (load)="onloadhandler()" style="border: none; display:none;width: 0; height: 0;"></iframe>
<iframe [attr.src]="url" height="800" width="100%"></iframe>
Xosmond / remote_sudo.rb
Created Dec 8, 2017 — forked from ainoya/remote_sudo.rb
Execute remote sudo command with net-ssh
View remote_sudo.rb
#!/usr/bin/env ruby
require 'net/ssh'
require 'highline/import'
def get_password
ask( "Enter Password: " ) {|q| q.echo = '*'}
def remote_sudo host, ssh_user, command, opts={}
Xosmond / Capybara Selectize
Created Dec 2, 2017
Helper methods for capybara on selecting elements with selectize.js
View Capybara Selectize
def selectize_single_select(field, value)
page.execute_script %Q{ $('.#{field} .selectize-input').click(); }
page.execute_script %Q{ $('.#{field} .selectize-dropdown-content .option:contains("#{value}")').click(); }
def selectize_multi_select(field, *values)
values.flatten.each do |tag|
page.execute_script "$('.#{field} .selectize-input').click();"
page.execute_script %Q{ $('.#{field} .selectize-dropdown-content').children("div:contains('#{tag}')").click(); }
page.execute_script "$('body').mousedown()"
View download_zip.rb
def download_zip(image_list)
unless image_list.blank?
file_name = ''
stringio = Zip::ZipOutputStream::write_buffer do |z|
z.put_next_entry("empty_folder/") ## Create a folder
image_list.each do |img|
title = img.title
title += '.jpg' unless title.end_with?('.jpg')
Xosmond /
Created Aug 31, 2017 — forked from ziadoz/
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# Versions
Xosmond / rspec_rails_cheetsheet.rb
Created Jul 20, 2017 — forked from them0nk/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet (include capybara matchers)
View rspec_rails_cheetsheet.rb
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
response.should render_template(:index)
response.should redirect_to(movies_path)
You can’t perform that action at this time.