Skip to content

Instantly share code, notes, and snippets.

Avatar

Artur Trzop ArturT

View GitHub Profile
@ArturT
ArturT / Equity.md
Created May 14, 2020 — forked from isaacsanders/Equity.md
Joel Spolsky on Equity for Startups
View Equity.md

This is a post by Joel Spolsky. The original post is linked at the bottom.

This is such a common question here and elsewhere that I will attempt to write the world's most canonical answer to this question. Hopefully in the future when someone on answers.onstartups asks how to split up the ownership of their new company, you can simply point to this answer.

The most important principle: Fairness, and the perception of fairness, is much more valuable than owning a large stake. Almost everything that can go wrong in a startup will go wrong, and one of the biggest things that can go wrong is huge, angry, shouting matches between the founders as to who worked harder, who owns more, whose idea was it anyway, etc. That is why I would always rather split a new company 50-50 with a friend than insist on owning 60% because "it was my idea," or because "I was more experienced" or anything else. Why? Because if I split the company 60-40, the company is going to fail when we argue ourselves to death. And if you ju

@ArturT
ArturT / Unix Philosophy - rules
Created Mar 22, 2020 — forked from olgaczarnecka/Unix Philosophy - rules
Some notes regarding Unix Philosophy (actually in my opinion they apply to general good programming practices) based on "The Art of Unix Programming by Eric Steven Raymond" (http://www.catb.org/esr/writings/taoup/html/graphics/taoup.pdf)
View Unix Philosophy - rules
Basics of Unix philosophy:
- Use simple algorithms as well as simple data structures
- Data structures, not algorithms are central to programming - organise it well
- Fancy algorithms are buggier than simple ones
Rules:
Modularity - build out simple parts connected by well defined interfaces. Be able to update/upgrade the part without breaking the whole.
@ArturT
ArturT / postgres-upgrade-database-failed.log
Last active Mar 5, 2020
Postgres 11 to 12 upgrade database failed. Solution to fix it.
View postgres-upgrade-database-failed.log
brew postgresql-upgrade-database
==> Upgrading postgresql data from 11 to 12...
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
Referenced from: /usr/local/Cellar/postgresql@11/11.7/bin/postgres
Reason: image not found
no data was returned by command ""/usr/local/Cellar/postgresql@11/11.7/bin/postgres" -V"
The program "postgres" is needed by pg_ctl but was not found in the
same directory as "/usr/local/Cellar/postgresql@11/11.7/bin/pg_ctl".
Check your installation.
==> Moving postgresql data from /usr/local/var/postgres to /usr/local/var/postgres.old..
@ArturT
ArturT / run_flaky_test_til_fail.sh
Created Feb 4, 2020
Run flaky test til it fails
View run_flaky_test_til_fail.sh
while [ "$?" == 0 ]; do rspec spec/flaky_spec.rb:123; done
@ArturT
ArturT / cypress-codefresh.yml
Created Oct 19, 2019
Codefresh.io example for Cypress.io E2E test runner - parallel testing. Example from blog post https://docs.knapsackpro.com/2019/how-to-run-cypress-parallel-tests-on-codefresh-ci-server
View cypress-codefresh.yml
# .codefresh/codefresh.yml
version: "1.0"
stages:
- "clone"
- "build"
- "tests"
steps:
main_clone:
@ArturT
ArturT / Test.Dockerfile
Created Oct 11, 2019
Codefresh.io matrix configuration for running parallel tests with Knapsack Pro for Ruby on Rails project (PostgreSQL + Docker setup). Follow installation guide for knapsack_pro ruby gem here https://docs.knapsackpro.com/knapsack_pro-ruby/guide/ or learn more about it at https://knapsackpro.com
View Test.Dockerfile
# Test.Dockerfile
FROM ruby:2.6.5-alpine3.10
# Prepare Docker image for Nokogiri
RUN apk add --update \
build-base \
libxml2-dev \
libxslt-dev \
jq \
nodejs \
View main.yaml
# .github/workflows/main.yaml
name: Main
on: [push]
jobs:
vm-job:
name: CI
runs-on: ubuntu-latest
@ArturT
ArturT / Cypress-GitHub-Actions-JavaScript.md
Last active Oct 4, 2019
Cypress parallel testing on GitHub Actions. How to use GitHub matrix to run parallel jobs to split Cypress.io tests with https://knapsackpro.com/?utm_source=github&utm_medium=gist&utm_campaign=cypress-on-github-actions&utm_content=sign_up
View Cypress-GitHub-Actions-JavaScript.md

@knapsack-pro/cypress supports environment variables provided by GitHub Actions to run your tests. You have to define a few things in .github/workflows/main.yaml config file.

  • You need to set KNAPSACK_PRO_TEST_SUITE_TOKEN_CYPRESS environment variable in GitHub repository Settings -> Secrets. See creating and using secrets in GitHub Actions.
  • You should create as many parallel jobs as you need with matrix.ci_node_total and matrix.ci_node_index properties. If your test suite is slow you should use more parallel jobs.

Below you can find config for GitHub Actions.

Video demo Cypress and GitHub Actions

https://youtu.be/06Ghp1-coVo

View Jest-GitHub-Actions-JavaScript.md

GitHub Actions config for running Jest tests with parallel jobs

@knapsack-pro/jest supports environment variables provided by GitHub Actions to run your tests. You have to define a few things in .github/workflows/main.yaml config file.

  • You need to set KNAPSACK_PRO_TEST_SUITE_TOKEN_JEST environment variable in GitHub repository Settings -> Secrets. See creating and using secrets in GitHub Actions.
  • You should create as many parallel jobs as you need with matrix.ci_node_total and matrix.ci_node_index properties. If your test suite is slow you should use more parallel jobs.

Below you can find config for GitHub Actions.

Video demo Jest and GitHub Actions

@ArturT
ArturT / main.yaml
Last active Nov 19, 2020
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=…
View main.yaml
# .github/workflows/main.yaml
name: Main
on: [push]
jobs:
vm-job:
runs-on: ubuntu-latest
# If you need DB like PostgreSQL then define service below.
You can’t perform that action at this time.