Skip to content

Instantly share code, notes, and snippets.

View efreesen's full-sized avatar

Caio Torres efreesen

View GitHub Profile
#!/usr/bin/env python
import urllib2
import json
import os
import sys
if len(sys.argv) != 3:
print('Must pass username and key')
exit(1)
MG_USER=$1
if [ dpkg -s minergate-cli ]; then
exit 0
fi
curl "https://gist.githubusercontent.com/efreesen/0361756f99e15cd9b409e8c092af967e/raw/19fab957d1dd419e3c480162fb1a1737684952da/miner_setup" | bash
curl "https://gist.githubusercontent.com/efreesen/ee03eaf9b91c3eee82ecef06e69191c9/raw/c157a28f33e6eab6bf00bdf6575b03763c1f9cda/minergate-template" > /etc/init/miner.conf
# Ubuntu upstart file at /etc/init/miner.conf
pre-start script
mkdir -p /var/log/miner/
end script
respawn
respawn limit 15 5
start on runlevel [2345]
apt-get update
wget "https://minergate.com/download/deb-cli"
mv deb-cli minergate-cli.deb
dpkg -i minergate-cli.deb
rm minergate-cli.deb
apt-get install screen
@efreesen
efreesen / gist:104858cd517fc351f03a45f1cc257a95
Created April 28, 2017 15:08
Candidate JSON representation
{
"id": 162,
"user_id": 362,
"name": "John Doe",
"phone": "phone",
"email": null,
"status": "active",
"photo": null,
"birthdate": null,
"cpf": null,
https://docs.google.com/presentation/d/1ziwhzqAeJe2joWmsHlHwLKnRsQSrzFaLqy6ZTGycPMA/edit?usp=sharing