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 / 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 / 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>
/* 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 / 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
@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 / 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()

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 / 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')
@webknjaz
webknjaz / README.md
Created April 19, 2018 15:07 — forked from crccheck/README.md
Python Packaging

What the Hell? -- A Journey Through the Nine Circles of Python Packing

Writing a setup.py

map

I am no Virgil, but having stumbled my way through Python packaging a few times already, I'm documenting the things I learn as I go here.

To help me learn, I took a survey of the top 15 Python packages on Github along with 12 other commonly referenced packages. I thought... if there are any best