Skip to content

Instantly share code, notes, and snippets.

View jemsgit's full-sized avatar
🚀

Evgeniy J jemsgit

🚀
View GitHub Profile
//dev
const webpack = require('webpack');
const path = require('path');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
module.exports = {
devtool: 'inline-eval-source-map',
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
function webpackProductionConfigBuilder(options) {
options = options || {};
const extractMainCSS = new ExtractTextPlugin(options.extractMainCSS || '[name].[hash].css'); //This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. ()
const extractIconsCSS = new ExtractTextPlugin(options.extractIconsCSS || '[name]-icons.[hash].css');
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)
}
}
// ==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
#!/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"
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;
#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/
import controlP5.*;
import processing.svg.*;
ControlP5 gui;
PImage p1;
PImage p2;
int imageScaleUp = 1;
// ==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
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",