This file contains hidden or 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
| javascript:(function(){if(window.__ytOBV){window.__ytOBV.tog();return}var s={d:true,c:null,mo:null,bmo:null,tm:0};function p(t){if(!t)return 0;t=t.replace(/\u00A0|\u202F/g,' ').toLowerCase();var m=1;if(/тыс|k\b/.test(t))m=1e3;else if(/млн|m\b/.test(t))m=1e6;else if(/млрд|b\b/.test(t))m=1e9;var n=(t.match(/[\d.,]+/)||['0'])[0];if(n.indexOf(',')>-1&&n.indexOf('.')>-1)n=n.replace(/,/g,'');else if(n.indexOf(',')>-1)n=n.replace(',','.');n=parseFloat(n)||0;return n*m}function find(){return document.querySelector('#contents.ytd-rich-grid-renderer,ytd-rich-grid-renderer #contents,#contents')}function Gtext(el){var spans=el.querySelectorAll('span.inline-metadata-item');for(var i=0;i<spans.length;i++){var tt=spans[i].innerText||'';if(/view|просм|тыс|млн|млрд|k|m|b/i.test(tt))return tt}return spans[0]&&spans[0].innerText||''}function app(){var c=s.c=find();if(!c)return;var items=Array.from(c.querySelectorAll('ytd-rich-item-renderer'));var arr=items.map(function(el){var node=el;while(node.parentElement&&node.parentElemen |
This file contains hidden or 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
| #!/bin/bash | |
| [ "$EUID" -ne 0 ] && exec sudo "$0" "$@" | |
| # switch to root | |
| wget "ftp.cz.debian.org/debian/pool/main/p/python3-stdlib-extensions/python3-lib2to3_3.9.2-1_all.deb" | |
| wget "ftp.dk.debian.org/debian/pool/main/p/python3-stdlib-extensions/python3-distutils_3.9.2-1_all.deb" | |
| wget "http://security.debian.org/debian-security/pool/updates/main/s/setuptools/python3-setuptools_52.0.0-4+deb11u1_all.deb" | |
| dpkg -i python3-lib2to3_3.9.2-1_all.deb | |
| dpkg -i python3-distutils_3.9.2-1_all.deb | |
| dpkg -i python3-setuptools_52.0.0-4+deb11u1_all.deb | |
| apt-get update |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| "github.com/progrium/darwinkit/dispatch" | |
| "github.com/progrium/darwinkit/helper/action" | |
| "github.com/progrium/darwinkit/helper/layout" | |
| "github.com/progrium/darwinkit/macos" |
This file contains hidden or 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
| def decompress_lz_buffer(src_buffer: bytes) -> bytes: | |
| """ | |
| Decompress a byte array using custom LZ77 algorithm. | |
| Args: | |
| src_buffer: Compressed bytes | |
| Returns: | |
| Decompressed bytes | |
| """ |
This file contains hidden or 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
| import os | |
| def get_window_name_with_applescript(): | |
| window_name = os.popen("osascript -e 'tell application \"System Events\" to get the name of window 1 of (first application process whose frontmost is true)'").read().strip() | |
| process_name = os.popen("osascript -e 'tell application \"System Events\" to get the name of (first application process whose frontmost is true)'").read().strip() | |
| return window_name, process_name |
This file contains hidden or 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
| How to fix the error "This version of ... is designed to run on a 32-bit windows operating system" on ARM version of windows? | |
| Run this command in the cmd with your msi file. | |
| msiexec -i FILENAME.MSI /passive |
This file contains hidden or 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
| Element.prototype.createEvent = function(name, ...params) { | |
| return new CustomEvent(name, ...params) | |
| } | |
| console.info = function(...args) { | |
| console.log(...args) | |
| } | |
| //this is just a placeholder | |
| class SVGElement { |
This file contains hidden or 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
| #input: [H (0 to 360), S (0 to 100), L (0 to 100)] | |
| #output: [R (0 to 255), G (0 to 255), B (0 to 255)] | |
| #reference: https://gist.github.com/PaulKinlan/d4053acfffd49abfa197a8d370a18337 | |
| def hsl_to_rgb(HSLlist): | |
| H, S, L = HSLlist | |
| S = S / 100 | |
| L = L / 100 | |
| C = (1 - abs(2 * L - 1)) * S | |
| X = C * (1 - abs(((H / 60) % 2) - 1)) | |
| m = L - C / 2; |
This file contains hidden or 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
| //Warning: fixed size is only kept for .push() method | |
| //Usage: | |
| //let arr = new FixedSizeArrayLifo(2) | |
| //arr.push(123); ... | |
| class FixedSizeArrayLiFo extends Array { | |
| constructor(size) { | |
| super() | |
| this.#size = size | |
| } |
This file contains hidden or 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
| // MULTI-CORE J2ME JAR HASHER | EXCLUDES EVERYTHING INSIDE MANIFEST FOLDER TO IGNORE MANIFEST-ONLY-CHANGES | (c) Remixer Dec 2019 | License: CC BY-NC 4.0 | |
| // usage: node jarhasher.js "C:/path/to/folder_with_jar_files_only_with_forward_slashes" CPU_LOGICAL_CORES HASHLIMIT | |
| // output: 2 files hashed.json, corrupted.json | |
| // output format: [["filename","md5","sha1"],...] | |
| const os = require('os') | |
| const JSZip = require("jszip"); | |
| const fs = require("fs") | |
| const crypto = require('crypto') | |
| const cluster = require('cluster'); |
NewerOlder