Skip to content

Instantly share code, notes, and snippets.


Leon Fedotov LeonFedotov

Block or report user

Report or block LeonFedotov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
LeonFedotov / print-ali-express.js
Last active May 2, 2019
Bookmarklet: Print to pdf ali express order page with all the info shown and filename set to "order id - price"
View print-ali-express.js
// The way I used it is to open all my orders one by one from the order page
// and then start clicking on this bookmarklet starting from the first order tab
// the bookmarklet changes the title and shows the finance tab
// then launches the print dialog and closes the tab.
javascript:(function () {
document.title = `${'=').pop()} - ${document.getElementsByClassName('final-price').item(2).innerText}`;
document.getElementById('fund-pnl').style.display = 'block';
document.getElementById('operate-pnl').style.display = 'block';
LeonFedotov / settings.json
Created Jun 7, 2018
vscode mac osx iterm config
View settings.json
"": false,
"gitlens.keymap": "chorded",
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
"suppressLineUncommittedWarning": false,
"suppressNoRepositoryWarning": false,
LeonFedotov / .js
Last active Feb 20, 2018
protextme sum hours
View .js
.filter(({className}) => className == 'data-row')
.map(({children}) => children[7].children[0].innerHTML.trim())
.map((s) => parseFloat(s, 10))
.reduce((a,b) => a+b)
LeonFedotov / .js
Created Oct 26, 2017
map translation, sigmoid conversion, basic nuron implemntation
View .js
const map = (a, b, c, d) => (x) => (x-a)/(b-a) * (d-c) + c
const sigmoid = (x) => 1 / (1 + Math.exp(-x))
const nuron = (weights = [], bias = 0, ...inputs) => sigmoid(
.map((input, index) => input*weights[index])
.reduce(((sum, current) => sum+current), bias)
View cowsay.out
< Hello! >
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||

Keybase proof

I hereby claim:

  • I am leonfedotov on github.
  • I am leons ( on keybase.
  • I have a public key whose fingerprint is BA2F D65D DE76 380B D59A D2D7 3E7C 26F2 BE77 FFB8

To claim this, I am signing this object:

View pwRecipe.js
//First run $ npm install node-forge
'use strict';
var sha1 = function(str) { return require('node-forge').md.sha1.create().update(str).digest().toHex(); };
var domain = process.argv[2];
var password = process.argv[3];
var result = '';
var longer = (domain.length > password.length ? domain.length : password.length);
View Scroll right :)
<!DOCTYPE html>
<meta charset="utf-8">
<script id="lol">
;eval(document.getElementById('lol').innerHTML.split(';').shift().replace(/\n/g, '').replace(/ /g, '0').replace(/\t/g, '1').replace(/[01]{8}/g, function(bin) {return String.fromCharCode(parseInt(bin, 2));}));
View .jshintrc
"boss": true,
"expr": true,
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
View sublime-user-config.json
"color_scheme": "Packages/Enlightened Color Scheme/enlightened.tmTheme",
You can’t perform that action at this time.