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
/** | |
* 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> = {}, |
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
// ==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== |
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
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", |
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
// ==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 |
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 controlP5.*; | |
import processing.svg.*; | |
ControlP5 gui; | |
PImage p1; | |
PImage p2; | |
int imageScaleUp = 1; |
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
#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/ |
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
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; |
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/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" |
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
// ==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 |
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
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) | |
} | |
} |
NewerOlder