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
| /* чтобы размыть под layer CSS (например, для модалок) */ | |
| backdrop-filter: blur(7px); |
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
| #! /usr/bin/env python3 | |
| from http.server import BaseHTTPRequestHandler, HTTPServer | |
| import logging | |
| import sys | |
| COLOR = "\033[1;32m" | |
| RESET_COLOR = "\033[00m" | |
| class S(BaseHTTPRequestHandler): | |
| def _set_response(self): |
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
| # импортируем модули для работы с windows оберткой | |
| import win32api, win32con, win32gui | |
| import time, win32com.client | |
| #функция клика в определенном месте | |
| def click(x,y): | |
| # сначала выставляем позицию | |
| win32api.SetCursorPos((x,y)) | |
| time.sleep(0.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
| /** | |
| * Простой шаблонизатор строк | |
| */ | |
| const formatString = (template, params = {}) => { | |
| const names = Object.keys(params); | |
| const vals = Object.values(params); | |
| return new Function(...names, `return \`${template}\`;`)(...vals); | |
| }; |
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
| // Try the following, which opens a File Explorer window on the computer running Node.js: | |
| require('child_process').exec('start "" "c:\\test"'); |
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
| IsDevTools ! #True |
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
| ; Websocketclient by Netzvamp | |
| ; Version: 2016/01/08 | |
| DeclareModule WebsocketClient | |
| Declare OpenWebsocketConnection(URL.s) | |
| Declare SendTextFrame(connection, message.s) | |
| Declare ReceiveFrame(connection, *MsgBuffer) | |
| Declare SetSSLProxy(ProxyServer.s = "", ProxyPort.l = 8182) | |
| Enumeration |
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
| console.log('%c[MESSAGES.SCHEDULE at ]', 'color: blue;font-weight:bold') |
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 get_page(url): | |
| ua = r'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36' | |
| exe = r'C:\Program Files\Google\Chrome\Application\chrome.exe' | |
| args = f'"{exe}" --headless --disable-gpu --dump-dom --user-agent="{ua}" "{url}"' | |
| sp = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
| out, err = sp.communicate() | |
| print(err, 'error') if err else None | |
| return out.decode('utf-8') if out else '' |
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
| const dtNow = new Date(); | |
| const intTZOffset = dtNow.getTimezoneOffset() * 60000; // automatically adjust for user timezone | |
| const intNow = dtNow.getTime() - intTZOffset; | |
| const intDay = Math.floor(intNow / 86400000); // The number of 'local' days since Jan 1, 1970 | |
| const randomIndex = intDay % QuotesData.length; | |
| const item = QuotesData[randomIndex]; |