Skip to content

Instantly share code, notes, and snippets.

View webknjaz's full-sized avatar
🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine

🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) webknjaz

🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine
View GitHub Profile
@webknjaz
webknjaz / orange_hrm_filler.js
Last active August 27, 2018 09:36
This script helps to pre-populate empty days in Orange HRM time tracking solution (https://www.orangehrm.com/)
/* Usage:
* First, fill in any absenses and business trips
* After that open DevTools (normally F12), and then REPL (Esc), and copy-paste this there + hit Enter
* Script will only fill in empty lines, ignoring what you filled in already, so it won't be corrupted
*/
function fill_in_day(tbl_row) {
$(tbl_row.querySelector('td>input[id$="_inTime"]')).val('09:00')
$(tbl_row.querySelector('td>input[id$="_outTime"]')).val('18:00')
$(tbl_row.querySelector('td>input[id$="_breakDuration"]')).val('01:00')
$(tbl_row.querySelector('td>label[id$="_totalWork"]')).val('08:00')

Visa requirements for UK conferences.

First you'll want to check if you need a visa to enter the UK.

  • Nationals of the EU, Switzerland, and EEA countries will not need a visa, and are free to work and conduct business in the UK.
  • Nationals from some designated countries such as USA may travel for tourist or business purposes under a visa exemption. The link above will detail what documents you need to provide in order to travel under a visa exemption.
  • Other nationals will need a visa.

The rules for allowable business travel under a visa exemption are covered by the same rules as those travelling under a vistor visa. If you will be travelling under a visa-exemption and the conference is covering your costs in any way you should make sure to read the relevant section below.

@webknjaz
webknjaz / shippable_job_fullscreen.js
Last active May 15, 2018 08:31
Make important part of job view in Shippable fullscreen
// F12 to enter DevTools, then copy-paste this snippet there
document.querySelector('.container>ui-view>div').webkitRequestFullScreen()
@webknjaz
webknjaz / externalmonitor
Created May 17, 2018 11:25 — forked from Gen2ly/externalmonitor
Toggle between laptop and external monitor
#!/bin/bash
# Toggle between laptop and external monitor
# Required program(s)
req_progs=(bc)
for p in ${req_progs[@]}; do
hash "$p" 2>&- || \
{ echo >&2 " Required program \"$p\" not installed."; exit 1; }
done
@webknjaz
webknjaz / test_client_fake_server.py
Created May 20, 2018 17:35 — forked from ambivalentno/test_client_fake_server.py
pytest-asyncio aiohttp client testing with fake server
import asyncio
import pathlib
import socket
import ssl
import pytest
import aiohttp
from aiohttp import web
from aiohttp.resolver import DefaultResolver
/* Usage:
* First, open https://github.com/[username]/[reponame]/network/members page of upsteam repo
* After that open DevTools (normally F12), and then REPL (Esc), and copy-paste this there + hit Enter
* Script will output a command for adding git remotes to your local repo, copy-paste that to your terminal
*/
function get_add_forks_cmd() {
let main_fork_slug = prompt('Enter [username]/[reponame] slug please:')
let fork_slugs = $x('//*[@id="network"]/div/a[2]/@href').
map(h => h.value.slice(1))
@webknjaz
webknjaz / gist-reveal.it-slides.html
Created September 12, 2018 19:15 — forked from ryanj/gist-reveal.it-slides.html
Gist-powered Revealjs slideshow presentations http://gist-reveal.it
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-background-transition='zoom' data-transition='linear' id='try-it'>
<h2>Try it out!</h2>
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p>
@webknjaz
webknjaz / smtest.py
Last active November 15, 2018 12:30 — forked from Giancarlos/smtest.py
import functools
import collections
import cherrypy
__metaclass__ = type # enable new-style classes by default
class SelectedMethod:
@webknjaz
webknjaz / 51-android.rules
Last active January 29, 2019 14:32 — forked from jdamcd/51-android.rules
Full set of Android USB vendor ID rules for Linux
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev", SYMLINK+="android%n" # Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0664", GROUP="plugdev", SYMLINK+="android%n" # Amazon
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev", SYMLINK+="android%n" # ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", GROUP="plugdev", SYMLINK+="android%n" # Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="plugdev", SYMLINK+="android%n" # Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev", SYMLINK+="android%n" # Fujitsu
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev", SYMLINK+="android%n" # Fujitsu Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="plugdev", SYMLINK+="android%n" # Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="0414", MODE="0666", GROUP="plugdev", SYMLINK+="android%n" # Gigabyte
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev", SYMLINK+="and