Skip to content

Instantly share code, notes, and snippets.

View igorshubovych's full-sized avatar
💭
I may be slow to respond.

Igor Shubovych igorshubovych

💭
I may be slow to respond.
View GitHub Profile
@igorshubovych
igorshubovych / README.md
Last active November 21, 2018 10:19
Cypress workshop instruction

Cypress workshop

Prerequesites

# Cloning repo
git clone https://github.com/igorshubovych/cypress-workshop

# Installing dependencies
cd cypress-workshop
@igorshubovych
igorshubovych / osx_bootstrap.sh
Created June 19, 2018 11:52 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@igorshubovych
igorshubovych / upgrade-brew-casks.sh
Created June 19, 2018 11:40
Upgrade brew casks
#!/bin/bash
brew cask outdated | xargs brew cask reinstall --force
@igorshubovych
igorshubovych / HappyPath.js
Last active October 6, 2017 08:54
E2E testing principle
HappyPath {
testLogin() {
const loginPage = new LoginPage();
loginPage.getEditBox().set('sdhj');
loginPage.pressSubmitButton();
}
}
@igorshubovych
igorshubovych / loops.js
Created March 31, 2017 10:23
JavaScript loops
// Factorial
// n
// 1 * 2 * 3 * ... * (n-1) * n
const n = 7;
let fact = 1;
for (let i = 1; i <= n; i++) {
fact = fact * i;
@igorshubovych
igorshubovych / testAsync.js
Created March 27, 2017 23:00
Test async/await in browser
async function test () {
return 'Testing async functions'
}
test().then(val => console.log(val))
@igorshubovych
igorshubovych / console.js
Created November 20, 2016 14:44
Save from ex.ua
var items = $('p > span.r_button_small a');
for (var i = 0, a=[]; i< items.length; i++) {
let item = items[i];
if (item.href && item.href.includes && item.href.includes('load')) {
a.push(item.href);
}
}
console.log(a);
<html>
<head>
<title>Test page</title>
</head>
<body>
<h1>Test page</h1>
<script type="text/javascript">
console.log('%cWe' + ' %care' + ' %chiring',
@igorshubovych
igorshubovych / TLDR_Cliend.md
Created December 12, 2015 20:46
New client for TLDR

New client

  • No dependencies, so cannot be written in NodeJS, Ruby, Python, Java :( Even though I like these languages very much.
  • It has to be easily installable on servers using package managers.
  • It should work on Windows too.
  • Most likely written either in Go (fork of existing?) or Rust. Can be written in C/C++, but I am very bad in it.
  • The recent pages archive should be downloaded together with package installation or added to package. So after apt-get install tldr it has to be ready to run.
  • It should auto-update pages archive regularly, similarly to oh-my-zsh.
  • Several people should contribute to it, there should be community around it, because it has to be actively supported, unlike current Go client.
  • NodeJS client should be kind of "reference implementation"
@igorshubovych
igorshubovych / TLDR_Pages.md
Last active December 13, 2015 08:20
Pages for TLDR

Many standard Unix utils

  • bc
  • test
  • look
  • netstat
  • uptime
  • vi
  • expr
  • hostname