Skip to content

Instantly share code, notes, and snippets.

View gourytch's full-sized avatar

Lev V. Babchenko gourytch

  • Teracloud ApS
  • Copenhagen, Denmark
View GitHub Profile
@gourytch
gourytch / gist:bf875e6cf7c968bdc912c13ab097f603
Created July 4, 2017 12:16 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <[email protected]>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@gourytch
gourytch / HFCalc.js
Last active May 21, 2017 14:41
HashFlare calculator: nodejs version
/*
* поиск оптимальной стратегии реинвестирования
* исходя из параметров майнера и наивной модели
* с зафиксированной стоимостью фалюты
* с неизменным значением ежедневной прибыльности
* и неизменяющейся вычислительной мощностью Сети
*/
let verbose = false;
@gourytch
gourytch / coinbrawl.user.js
Last active September 12, 2018 00:02
simple automation for https://www.coinbrawl.com/
// ==UserScript==
// @name CoinBrawlAutomaton
// @description Вкачиваем натыренное золото по статам
// @author Gourytch
// @license WTFPL
// @version 1.1
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @include https://coinbrawl.com/*
// @include https://www.coinbrawl.com/*
// @grant GM_getValue
@gourytch
gourytch / hfcalc.user.js
Last active March 2, 2017 02:45
tampermonkey script for hashflare history log parsing
// ==UserScript==
// @name HFCalc
// @description Подсчёт текущей профитности майнинга по истории
// @author Gourytch
// @license WTFPL
// @version 1.1
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @include https://hashflare.io/panel/history
// ==/UserScript==
(function (window, undefined) {
@gourytch
gourytch / freqs.cpp
Created February 22, 2017 18:58
test work for UNIGINE class
//
// lazy quick-and-dirty solution for UNIGINE class
// made as an object for procrastination.
// about 4..5 hours of holiday was spent
// tested on g++
// usage:
// freqs infile1 [...] outfile
// # build dictionary
// # from words in all input files
// # and write result to output file
# file: /etc/apt/sources.list
# note: for Debian 8 Jessie
###############################
deb http://deb.debian.org/debian jessie main contrib non-free
deb-src http://deb.debian.org/debian jessie main contrib non-free
deb http://deb.debian.org/debian jessie-updates main contrib non-free
deb-src http://deb.debian.org/debian jessie-updates main contrib non-free
deb http://deb.debian.org/debian jessie-backports main contrib non-free
deb-src http://deb.debian.org/debian jessie-backports main contrib non-free
deb http://deb.debian.org/debian jessie-backports-sloppy main contrib non-free
#! /usr/bin/env python2.7
import subprocess
import threading
import re
import tempfile
import os
tmpdir = tempfile.mkdtemp()
luafile = tmpdir + "/dump.lua"
@gourytch
gourytch / livemap_reformatted.js
Last active July 5, 2016 05:01
livemap.js, переформатированный для удобочитаемости
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// LIVEMAP_REFORMATTED.JS
// SOURCE: http://map.playrust.io/js/rustio/livemap.js
// FORMAT: http://jsbeautifier.org/
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////
function initLiveMap() {
$('#signin').click(function() {
// ==UserScript==
// @name FBCBot
// @namespace https://localhost/fbcbot
// @description freebitco.in bot
// @include https://freebitco.in/*
// @version 1
// @grant none
// @noframes
// @run-at document-idle
// ==/UserScript==
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<meta name="description" content="80x24 screen editor" />
<title>80x24 screen editor</title>
<style type="text/css">
@font-face {
font-family: "webfix";