This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clicker_button = document.getElementsByClassName("Keyboard")[0].getElementsByClassName("Button")[0], | |
clicker_count = 100000, | |
clicker_delay = 2000; | |
function botClick() { | |
clicker_button.click(); | |
if (--clicker_count) { | |
setTimeout(botClick, clicker_delay); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set FILTER_BRANCH_SQUELCH_WARNING=1 | |
git filter-branch -f --commit-filter "GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE";GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME";GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL";git commit-tree "$@";" HEAD | |
or | |
git filter-branch -f --commit-filter "GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE";GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME";GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL";git commit-tree -S "$@";" HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set ROOT_PATH="." | |
set COMMAND=git gc | |
FOR /R "%ROOT_PATH%" %%F IN (.) DO ( | |
IF EXIST "%%F/.git" ( | |
echo Handling "%%F"... | |
cd %%F | |
%COMMAND% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run on vk.com/docs page: | |
for (let item of document.getElementsByClassName("docs_delete_row")) item.click(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadFont(name, local=[], | |
eot=undefined, woff=undefined, woff2=undefined, ttf=undefined, | |
font_weight="normal", font_style="normal", font_display="auto") { | |
name = `font-family:'${name}';`; | |
let eot_sep = (eot == undefined ? '' : `src:url('${eot}');`); | |
paths = []; | |
for (let path of local) paths.push(`local('${path}')`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from string import ascii_uppercase, digits | |
alphabet = digits + ascii_uppercase | |
def convert_base(n: str, from_base: int = 10, to_base: int = 10) -> str: | |
if isinstance(n, str): | |
n = int(n, from_base) | |
if n < to_base: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// These are values for the end result width and height (in pixels) of our image | |
// | |
// Common values: | |
// Vk.com max photo size: 2560 x 2160 | |
var target_width = 1920; | |
var target_height = 1080; | |
// ======================================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set submodule_path=%1 | |
git submodule deinit -f "%submodule_path%" | |
rmdir /S /Q ".git/modules/%submodule_path%" | |
git rm -f "%submodule_path%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var name = "Name Surname"; | |
function update() { | |
for (let post of document.querySelectorAll("#discussion-topics > li")) { | |
if (post.querySelector(".topic > .post-container > .post > .post-header > .post-info > a.str-click-name-js > strong").innerText == name) { | |
console.log(post.querySelector(".topic > .post-container > .post > .post-content .post-body > a").href); | |
} | |
post.remove(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var layout = document.getElementById("app").getElementsByClassName("grid")[0]; | |
var cards = layout.getElementsByClassName("card"); | |
function next() { | |
var found = false; | |
for (var i = 0; i < cards.length; ++i) { | |
for (var j = 0; j < i && !found; ++j) { | |
if ( | |
cards[i].getElementsByClassName("card__img")[0].src == cards[j].getElementsByClassName("card__img")[0].src && | |
!cards[i].classList.contains("card--flipped") && !cards[j].classList.contains("card--flipped") |
OlderNewer