Skip to content

Instantly share code, notes, and snippets.

@mark-sch
mark-sch / gist:ce129f3cd20f49980f3c5af2712b0b34
Last active June 19, 2019 15:10
Grub2: Set default kernel on CentOS7 while in Ubuntu recovery mode
Server4you customer web login -> Boot into Recvery mode (Ubuntu)
SSH connect and execute on recovery terminal:
> fdisk -l
> mdadm --assemble --scan
> mount /dev/md1 /mnt
> mount /dev/md0 /mnt/boot
> mount -t proc proc /mnt/proc
> mount -t sysfs sys /mnt/sys
2018-08-30 11:31:14 (DEBUG): Check database exists: binance
2018-08-30 11:31:14 (DEBUG): Database exists: binance
2018-08-30 11:31:14 (DEBUG): Postgres connection pool is ready, db binance
2018-08-30 11:31:14 (DEBUG): ***** buy after low peak ***** 1533687240000
2018-08-30 11:31:14 (INFO): [StratRunner] Trailing stop trail value specified as percentage, setting to: 120.96108000000002
>>>>>>>>>>>>>>>> relayAdvice
########## processAdvice, TRIGGER: {"type":"trailingStop","trailPercentage":1.8,"trailValue":120.96108000000002}
2018-08-30 11:31:14 (INFO): 2018-08-08 02:15:00: Paper trader simulated a BUY @ 6589.19 USDT 0.00000000 USDT => 0.15153607 BTC
!!!!!!!!!!!!!!!!!!!!!!! onStopTrigger, showing
Trace: console trace
Mining Rig:
============
https://github.com/rodneymo/rig-monitorv2
Mining Pool:
=============
Node.js Ethereum Mining Pool:
https://github.com/sammy007/open-ethereum-pool
Proxies:
@mark-sch
mark-sch / git-commit-notifier-cron.sh
Last active January 31, 2018 20:36
Monitor GIT remote commits and send out pretty diff e-mails, e.g. for use as a daily cron to monitor fork parents on github. It uses https://github.com/git-commit-notifier/git-commit-notifier and feeds it with the wanted params.
#!/bin/bash
#my git clone to monitor with remote upstream
cd /git/ediabaslib/
git fetch upstream
#get all commits from this remote from the last 1 day
git log upstream/master --pretty=format:"%h" --since="1 day ago" > commits.today
#latest commit
myhead="$(head -n 1 commits.today)"
@mark-sch
mark-sch / upmerge.sh
Last active June 21, 2018 01:33
Bash script to automate GIT upstream remote cherry picking - by maintaining a merge.history file of cherry pick ranges.
#!/bin/bash
echo ""
echo "///////////////////////////////////////////////////////////////////////"
echo "/ Display new upstream/master commits since last origin/master merge: /"
echo "/ /"
echo "/ Or start with further command line params /"
echo "/ \"step1\" = checkout new upmerge branch, merge and interactively add /"
echo "/ \"step2\" = commit new branch, merge with master and delete upmerge /"
echo "///////////////////////////////////////////////////////////////////////"
@mark-sch
mark-sch / nsupdate.php
Created February 20, 2014 08:42
PHP script to automate nsupdate calls for dynamic dns updates. This script and a properly configured bind nameserver allows hosting of custom dyndns services, e.g. updating own domain from Fritzbox.
<?php
// *** PHP script to automate nsupdate calls for dynamic dns updates.
// *** This script and a properly configured bind nameserver allows hosting
// *** of custom dyndns services, e.g. updating own domain from Fritzbox.
// *** usage: http://192.168.0.25/nsupdate.php?ns=ns0.mynameserver.de&domain=my.domain.de;my.domain2.de&newip=<ipaddr>
if (!isset($_SERVER['PHP_AUTH_USER']))
{
Header("WWW-Authenticate: Basic realm=\"Configurations-Editor\"");
Header("HTTP/1.0 401 Unauthorized");