Skip to content

Instantly share code, notes, and snippets.

View jemsgit's full-sized avatar
🚀

Evgeniy J jemsgit

🚀
View GitHub Profile
/**
* Creates multipart body for files with additional headers
* @param formData native FormData
* @param headers object: key - field name, value - object with header: value pairs
* @returns contentType and body
*/
function createMultipartBody(
formData: FormData,
headers: Record<string, AdditionalHeaders> = {},
// ==UserScript==
// @name Extract Text from Astrocentr Pages
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Extract text content from multiple pages on Astrocentr website
// @author Your Name
// @match https://www.astrocentr.ru/index.php*
// @grant none
// ==/UserScript==
async function metakomToDallas(key) {
//key - ключ в формате FF 65 28 C0
async function callCRCService(key) {
let resp = await fetch('https://openapi.lddgo.net/base/gtool/api/v1/Crc?lang=en', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=utf-8'
},
body: JSON.stringify({algorithm: "crc8Maxim",
// ==UserScript==
// @name eductiveGrubPath
// @description Grub educative course
// @author Jem Jem
// @license MIT
// @version 1.0
// @include https://www.educative.io/path/*
// ==/UserScript==
(async function (window, undefined) { // [2] нормализуем window
import controlP5.*;
import processing.svg.*;
ControlP5 gui;
PImage p1;
PImage p2;
int imageScaleUp = 1;
#ifndef BOARD_WEMOS_H
#define BOARD_WEMOS_H
//------------------------------------------------------------------------------
// Makelangelo - firmware for various robot kinematic models
// [email protected] 2013-12-26
// Please see http://www.github.com/MarginallyClever/makelangeloFirmware for more information.
//------------------------------------------------------------------------------
// https://www.instructables.com/id/Programming-the-WeMos-Using-Arduino-SoftwareIDE/
let path = require('path');
function requireDynamically(modulePath) {
modulePath = path.resolve('./', modulePath);
return eval(`require('${modulePath}');`); // Ensure Webpack does not analyze the require statement
}
module.exports = requireDynamically;
#!/usr/bin/expect -f
set pass [lindex $argv 0];
spawn rsync -au --progress dist/ -e "ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no" [email protected]:/path/to/project/folder
expect "passphrase"
send "$pass\r"
expect eof
spawn ssh -i ~/.ssh/id_rsa [email protected] "cd /path/to/project/folder && npm i"
// ==UserScript==
// @name eductiveGrub
// @description Grub educative course
// @author Jem Jem
// @license MIT
// @version 1.0
// @include https://www.educative.io/courses/*
// @include https://www.educative.io/module/*
// ==/UserScript==
(async function (window, undefined) { // [2] нормализуем window
function scroll(prevlast){
let els = document.querySelectorAll('.wo9IH');
let last = els[els.length -1]
if(last != prevlast) {
last.scrollIntoView();
prevlast = last;
setTimeout(function(){scroll(prevlast)},2000)
}
}