Skip to content

Instantly share code, notes, and snippets.

View palkx's full-sized avatar
🙃

Mykhailo N. palkx

🙃
View GitHub Profile

Keybase proof

I hereby claim:

  • I am madxkk on github.
  • I am madxkk (https://keybase.io/madxkk) on keybase.
  • I have a public key whose fingerprint is DE6D 1B6F 92BE 303E 729E 44BC 6507 0186 D0C9 21AA

To claim this, I am signing this object:

@palkx
palkx / VK remove all audio.md
Last active November 19, 2018 22:41
Remove all audio on vk

Load all audio on page, then open developer console (ctrl+shift+i) and insert this code:

var nodes = document.querySelectorAll("._audio_act_delete"), i = 0, inter = setInterval( function() { if (i == nodes.length) { clearInterval(inter);}; var evObj = new Event('click'); nodes[i].dispatchEvent(evObj); i++; }, 100);

Copy this script and insert in console

var nodes = document.querySelectorAll(".ui_actions_menu_item"), i = 0, inter = setInterval( function() { if (i == nodes.length) { clearInterval(inter);}; if (nodes[i].innerHTML === "Delete post" || nodes[i] === "Удалить запись") nodes[i].click(); i++; }, 100);
@palkx
palkx / proxy.pac
Last active November 25, 2017 19:45
Proxy.pac for ukraine (ips from zaborona.help)
function FindProxyForURL(url, host) {
const nets = `
pasted content of https://zaborona.help/ips.txt here
# Vkontakte
# ------------------------
87.240.128.0/18
93.186.224.0/20
95.142.192.0/20
95.213.0.0/18
185.29.130.0/24
@palkx
palkx / Windows-registry-tweak.reg
Last active September 4, 2022 12:31
Windows personalized settings registry tweak
Windows Registry Editor Version 5.00
;Добавить пункт "Копировать в папку..." в контекстное меню файлов
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\CopyTo]
@="{C2FBB630-2971-11d1-A18C-00C04FD75D13}"
;Добавить пункт "Переместить в папку..." в контекстное меню файлов
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\MoveTo]
@="{C2FBB631-2971-11d1-A18C-00C04FD75D13}"
@palkx
palkx / local-network-1803-fix.cmd
Created October 17, 2018 13:52
Fix local network issues in Windows 10 1803 and later
@ECHO OFF
SC config fdPHost start=delayed-auto
sc failure fdPHost reset=86400 actions=restart/120000/restart/120000/restart/120000
SC start fdPHost
SC config FDResPub start=delayed-auto
sc failure FDResPub reset=86400 actions=restart/120000/restart/120000/restart/120000
SC start FDResPub
SC config SSDPSRV start=delayed-auto
sc failure SSDPSRV reset=86400 actions=restart/120000/restart/120000/restart/120000
SC start SSDPSRV
@palkx
palkx / vk_like_all_posts.js
Created November 17, 2018 23:39
Scripts likes all posts currently loaded on page. Be careful with high amount of posts, you can get silent ban from VK
var nodes=document.querySelectorAll(".like_wrap:not(.lite)"),i=0,inter=setInterval(function(){if(i==nodes.length){clearInterval(inter)};if(nodes[i].children[0].children[0].children[0].classList.length===3){nodes[i].children[0].children[0].children[0].click();console.log(`Liked post ${i} ${nodes[i]}`)};i++},2000);
@palkx
palkx / example-config.yml
Last active September 18, 2019 12:38
This is simple script based on telethon which can forward messages from multiple channels to your one channel, and you can create multiple rules in config.yml. Requires pyyaml and telethon install from pip3.
api_id: 111111 # This has to be an integer.
api_hash: '32symbolsstring' # Long 32 characters hash identifier.
session_name: 'session_name' # Session name.
channels:
- input_channels:
- 'channel'
- 'channel'
- 'channel'
output_channel: 'channel'
@palkx
palkx / Global sign-off hook.md
Last active October 14, 2019 11:40
Git global sign-off hook

Add global hooks dir

git config --global core.hooksPath /path/to/my/centralized/hooks

Add commit-msg hook

#!/bin/sh

NAME=$(git config user.name)
@palkx
palkx / bash_profile.md
Created October 29, 2019 07:01
My PS1 env variable

Paste it in ~/.bash_profile

# assets 𝘟 ✗ Ӽ 𝘟 𝞦 ✔ ✓ ▲ ➜
# Git status

check_status() {

red="$bold$(tput setaf 1)"
green=$(tput setaf 2)