Skip to content

Instantly share code, notes, and snippets.

View vadimstasiev's full-sized avatar

AName* name("Vadim"); vadimstasiev

View GitHub Profile
@vadimstasiev
vadimstasiev / Dockerfile
Created May 4, 2020 22:01 — forked from Beyarz/Dockerfile
Updated version of: docker-compose with Php 7.2.6, Mysql 8.0.16, Phpmyadmin 4.8 & Apache
FROM php:7.2.6-apache
RUN docker-php-ext-install mysqli
@vadimstasiev
vadimstasiev / script.js
Created July 28, 2020 21:11
Fast Infinite Scroll Down - JavaScript
// I made this to use for selenium to inject and get a page to fully scroll down to the bottom
// however as I later found out, certain website elements unload once they get out of the user's view
// but this may come in handy for other things, so here it is
window.isDoneScrolling = false;
let numberOfTries = 0;
const maxNumberOfTries = 100;
let lastScrollHeight = document.body.scrollHeight;
let scrollThePageInterval = setInterval(()=>{window.scrollTo(0, document.body.scrollHeight);
if(lastScrollHeight===document.body.scrollHeight){
// This file was initially generated by Windows Terminal 0.11.1121.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@vadimstasiev
vadimstasiev / gist:07ea6cd73e2d580c920168cc3be57be7
Created August 26, 2020 16:32
Import/Export localStorage
Export
copy(JSON.stringify(JSON.stringify(localStorage)));
Import
var data = JSON.parse(/*previously copied stringified JSON from clipboard*/);
Object.keys(data).forEach(function (k) {
localStorage.setItem(k, data[k]);
});
function constructJson(jsonKey, jsonValue){
var jsonObj = {"key1": jsonValue};
jsonObj[jsonKey] = "2";
return jsonObj;
}
@vadimstasiev
vadimstasiev / README.md
Created September 17, 2020 12:12
Creating custom launcher to set custom process affinity for a given game or program

Notes

This is using powershell 7, I haven't tested with the regular one, but feel free to do so, just swap 'pwsh' with 'powershell' Must also install the ProcessPriority PowerShell module, from: https://github.com/pcgeek86/ProcessPriority

  • To install it just run: Install-Module -Name ProcessPriority -Scope CurrentUser -Force
sudo docker run --restart unless-stopped --sysctl net.ipv6.conf.all.disable_ipv6=0 --cap-add=NET_ADMIN -d \
-v /etc/docker-configs/qBittorrent:/config/qBittorrent/data/BT_backup \
-v /etc/docker-configs/qBittorrent/GeoDB:/config/qBittorrent/data/GeoDB \
-v /etc/docker-configs/qBittorrent/rss:/config/qBittorrent/data/rss \
-v /etc/docker-configs/qBittorrent/config:/config/qBittorrent/config \
-v /etc/docker-configs/qBittorrent/cache:/config/qBittorrent/cache \
-v ~/Downloads/torrent:/data \
-v /media/vadim-media/Media:/complete_downloads \
-v /etc/localtime:/etc/localtime:ro \
-e CREATE_TUN_DEVICE=true \
@vadimstasiev
vadimstasiev / Instructions
Created January 17, 2021 14:07
dummy 1080p display
sudo apt install xserver-xorg-video-dummy
sudo nano /etc/X11/xorg.conf
@vadimstasiev
vadimstasiev / archlinux-steamlink_install.sh
Last active July 26, 2023 21:43 — forked from PlatinumMaster/archlinux-steamlink_install.sh
Arch Linux chroot installation on the Steam Link.
curl http://ipinfo.io/ip
curl http://ipecho.net/plain
curl icanhazip.com