Skip to content

Instantly share code, notes, and snippets.

View pointofpresence's full-sized avatar
🏠
Working from home

ReSampled pointofpresence

🏠
Working from home
View GitHub Profile
; 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
@pointofpresence
pointofpresence / 1672591592.pb
Last active March 31, 2024 14:55
Created with Copy to Gist
IsDevTools ! #True
@pointofpresence
pointofpresence / openInFileExplorer.js
Last active March 31, 2024 12:39
Node.js: Как открыть файл в менеджере файлов?
// Try the following, which opens a File Explorer window on the computer running Node.js:
require('child_process').exec('start "" "c:\\test"');
@pointofpresence
pointofpresence / utils.js
Created December 19, 2022 11:19
Простой шаблонизатор с трок ES6
/**
* Простой шаблонизатор строк
*/
const formatString = (template, params = {}) => {
const names = Object.keys(params);
const vals = Object.values(params);
return new Function(...names, `return \`${template}\`;`)(...vals);
};
@pointofpresence
pointofpresence / mouse and keyboard automation.py
Last active March 31, 2024 14:35
Python: Эмуляция клавиатуры и мыши в Windows
# импортируем модули для работы с windows оберткой
import win32api, win32con, win32gui
import time, win32com.client
 
#функция клика в определенном месте
def click(x,y):
    # сначала выставляем позицию
    win32api.SetCursorPos((x,y))
    time.sleep(0.2)
    # а потом кликаем (небольшая задержка для большей человечности)
@pointofpresence
pointofpresence / simple http web server.py
Last active March 31, 2024 20:51
simple http web server
#! /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):
@pointofpresence
pointofpresence / backdrop-filter blur.css
Last active March 31, 2024 20:20
CSS: Размытие заднего плана с backdrop-filter: blur()
/* чтобы размыть под layer CSS (например, для модалок) */
backdrop-filter: blur(7px);
@pointofpresence
pointofpresence / css_min.js
Last active March 31, 2024 11:23
Функция min() принимает одно или большее количество значений, разделённых запятой, и возвращает наименьшее из них. Эту функцию используют для ограничения значений CSS-свойств жёстко заданным максимальным уровнем.
padding: min(85%, 9.75em) 0;
@pointofpresence
pointofpresence / 1661875637.txt
Created August 30, 2022 16:07
Created with Copy to Gist
Conditionally adding entries inside Array and object literals
http://2ality.com/2017/04/conditional-literal-entries.html
@pointofpresence
pointofpresence / ffmpeg split .bat
Last active March 31, 2024 20:29
FFmpeg: Разбить видео на фрагменты по времени
https://stackoverflow.com/questions/5651654/ffmpeg-how-to-split-video-efficiently - VIDEO SPLIT
time ffmpeg -v quiet -y -i input.ts -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 -sn test1.mkv
time ffmpeg -v quiet -y -i input.ts -vcodec copy -acodec copy -ss 00:30:00 -t 01:00:00 -sn test2.mkv