Skip to content

Instantly share code, notes, and snippets.

View valdemarua's full-sized avatar

Volodymyr valdemarua

View GitHub Profile
@rodydavis
rodydavis / flutter_github_ci.yml
Last active October 22, 2024 09:09
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@ArturT
ArturT / main.yaml
Last active November 9, 2022 06:10
GitHub Actions - how to run parallel tests in RSpec for Ruby on Rails project. See article how to run RSpec on GitHub Actions for Ruby on Rails app using parallel jobs https://docs.knapsackpro.com/2019/how-to-run-rspec-on-github-actions-for-ruby-on-rails-app-using-parallel-jobs or sign up at https://knapsackpro.com/?utm_source=github&utm_medium=…
# .github/workflows/main.yaml
name: Main
on: [push]
jobs:
test:
runs-on: ubuntu-latest
# If you need DB like PostgreSQL, Redis then define service below.
@lucaspiller
lucaspiller / .gitlab-ci.yml
Last active April 14, 2022 09:07
Rails 5.2 + Docker + Gitlab Continuous Deployment
image: ruby:2.6
services:
- postgres:11-alpine
variables:
POSTGRES_DB: myorg_test
CONTAINER_IMAGE: registry.gitlab.com/myorg/myapp
stages:
@diuis
diuis / gist:fc1c2f0e255538cda397c5a6b669c9bf
Created October 5, 2018 13:24
react video element iOS autoplay
import * as React from "react";
import { Container, Row, Col } from 'reactstrap';
import '../styles/video-react.css'
export interface ApplicationProps { url: string; }
export class Application extends React.Component<ApplicationProps, {}> {
private videoNode: HTMLVideoElement;
@parmort
parmort / tmux_tc.md
Created March 26, 2018 21:47
Tmux TrueColor Setup

Tmux TrueColor (a.k.a. 24-bit color) Support

Prerequisites

To enable TrueColor for Tmux, you must make sure that you have two things:

  1. Tmux version 2.2 or higher. You can find out your version by running tmux -V
  2. You have a terminal that supports TrueColor (it may also be referenced by 24 bit color. To check if you do, run
@maxivak
maxivak / __readme.md
Last active January 19, 2024 15:00
Load code in libraries in Rails 5

Load lib files in production (Rails 5)

If you have your code defined in classes in lib/ folder you may have problems to load that code in production.

Autoloading is disabled in the production environment by default because of thread safety.

Change config/application.rb:

    config.autoload_paths << Rails.root.join("lib")
 config.eager_load_paths &lt;&lt; Rails.root.join("lib")
@johnmeehan
johnmeehan / browserstack.md
Last active March 1, 2020 22:10
Browserstack + Rails5 + RSpec + Capybara

Browserstack

My setup for configuring a Rails app with RSpec Feature tests that uses Capabara to test on a browserstack remote browser.

The browserstack docs only show either an RSpec or a Capabara setup.

What I wanted:

  1. In development run my tests quickly with poltergiest.
  2. Run nightly builds on CI to test against different web browsers using browserstack.
  3. Have the option to visually run my tests with selenium with Chrome, Firefox etc.
@matthewrudy
matthewrudy / capybara-headless-chrome.rb
Created June 26, 2017 09:58
Running headless chrome on capybara with selenium webdriver
require "selenium/webdriver"
Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.new(app, browser: :chrome)
end
Capybara.register_driver :headless_chrome do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { args: %w(headless disable-gpu) }
)
@RoyalIcing
RoyalIcing / Dockerfile
Last active July 12, 2024 02:35
Rails 5.1 Dockerfile
FROM ruby:2.4-alpine
ENV PATH /root/.yarn/bin:$PATH
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh build-base nodejs tzdata
RUN apk update \
&& apk add curl bash binutils tar gnupg \
&& rm -rf /var/cache/apk/* \
@wrburgess
wrburgess / example_job.rb
Last active April 6, 2020 20:17
ActiveJob on Rails 5 with RSpec
# app/jobs/example_job.rb
class ExampleJob < ActiveJob::Base
queue_as :default
rescue_from(ActiveRecord::RecordNotFound) do
retry_job wait: 1.minute, queue: :default
end
def perform(param_1, param_2)