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
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
// 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
@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
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
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); | |
} | |
} |
NewerOlder