Skip to content

Instantly share code, notes, and snippets.

View alessandrostein's full-sized avatar

Alessandro Stein alessandrostein

View GitHub Profile
@alessandrostein
alessandrostein / rails_heroku_how_to_fix_error_node_modules_node_sass_command_failed.md
Last active January 29, 2022 20:35
Rails/Heroku - How to fix error node_modules/node-sass: Command failed.
  • Move to the trash these files: node_module folder, package-lock.json and yarn.lock;
  • In your package.json upgrade webpacker to 5.3.0;
  • Run yarn install in your console

That's it!

In case you don't have the start script in your package.json, you can add:

"scripts": {
@alessandrostein
alessandrostein / ruby-on-rails-developer.md
Last active September 15, 2020 21:59
[Remoto] Full Stack Ruby on Rails Developer

[Remoto] Full Stack Ruby on Rails Developer

Hey Devs,

Sobre

Me chamo Alessandro Stein e minha pequena empresa Stein Tecnologia esta precisando de um Rails developer devido a alta demanda de novos projetos, principalmente do exterior. Nós trabalhamos na criação de MVP's e também na manutenção de projetos, todos em Ruby on Rails. Nesta oportunidade, a parte técnica não é a mais importante, e sim, que essa pessoa seja responsável e queira crescer junto com a empresa em ritmo acelerado. Queremos ser um trampolim para a sua carreira.

# Server Console
Finished "/cable/" [WebSocket] for ::1 at 2020-06-08 22:05:04 -0300
NotificationChannel stopped streaming from notification_channel
TestChannel stopped streaming from test
StimulusReflex::Channel stopped streaming from StimulusReflex::Channel
Started GET "/cable" for ::1 at 2020-06-08 22:05:04 -0300
Started GET "/cable/" [WebSocket] for ::1 at 2020-06-08 22:05:04 -0300
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
#include <locale.h>
typedef struct { //struct para armazenar clientes no cadastro
char nome[30];
int rg;
int telefone;
@alessandrostein
alessandrostein / README.md
Last active September 30, 2022 04:56
Selenium::WebDriver::Error::UnknownError: unknown error: Chrome failed to start: crashed (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /app/.apt/opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Ruby on Rails Project

Rails 5.2.3 ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

Using webdrivers and capybara

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
## Get the lastes tickets
https://skybox.vividseats.com/services/tickets?lastUpdateFrom=2019-03-18
## Get inventory sold
# Check if inventory exists (available)
https://skybox.vividseats.com/services/inventory/69822544
# Check if inventory exists (sold)
https://skybox.vividseats.com/services/inventory/sold?inventoryId=69822544
"Inventory" : {
"required" : [ "cost", "eventId", "quantity", "row", "seatType", "section", "splitType", "stockType" ],
"type" : "object",
"properties" : {
"inHandDate" : {
"type" : "string",
"description" : "The date that the tickets will be in hand",
"format" : "date"
},
"id" : {
"Ticket" : {
"required" : [ "cost", "faceValue", "row", "seatNumber", "section", "sellPrice", "status", "stockType" ],
"type" : "object",
"properties" : {
"id" : {
"type" : "integer",
"description" : "Unique identifier of the ticket.",
"format" : "int64"
},
"seatNumber" : {
def reversal!(text)
textVowels = getVowels(text)
textReversal = ""
vowelPosition = 0
for j in 0..text.size - 1 do
if isVowel(text[j])
vowelPosition += 1
if vowelPosition == textVowels.size
textReversal << textVowels[0]
COMANDS = [:place, :move, :left, :right, :report]
DIRECTIONS = [:north, :east, :south, :west]
TABLETOP_MAX_WIDTH = 4
TABLETOP_MAX_HEIGHT = 4
@x, @y, @position = [0,0, :north]
def place(params)
args = params.split(",")
position_x = args[0].to_i