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 / 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() {
#! /usr/bin/env python2.7
import subprocess
import threading
import re
import tempfile
import os
tmpdir = tempfile.mkdtemp()
luafile = tmpdir + "/dump.lua"
# 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
@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
@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 / 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.js
Last active May 21, 2017 14:41
HashFlare calculator: nodejs version
/*
* поиск оптимальной стратегии реинвестирования
* исходя из параметров майнера и наивной модели
* с зафиксированной стоимостью фалюты
* с неизменным значением ежедневной прибыльности
* и неизменяющейся вычислительной мощностью Сети
*/
let verbose = false;
@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 / DOCKER_CLEANUP.sh
Created July 18, 2017 07:11
docker cleanup
#! /bin/bash
# remove all stopped containers
docker ps -a -q | xargs -r docker rm
#remove all unused volumes
docker volume ls -qf dangling=true | xargs -r docker volume rm
# remove all untagged images
docker images -q -f dangling=true | xargs -r docker rmi
@gourytch
gourytch / wotlk_macros.txt
Last active April 1, 2019 21:22
My WotLK macroses
#
# Druid
####################################################################
# shift shape to bear and start attack
#showtooltip
/cast [nostance:1] !Облик медведя
/stopmacro [noexists][noharm][dead]
/cast Рык