Skip to content

Instantly share code, notes, and snippets.

View mariodian's full-sized avatar

Mario Dian mariodian

View GitHub Profile
Verifying I am +mariodian on my passcard. https://onename.com/mariodian
### Keybase proof
I hereby claim:
* I am mariodian on github.
* I am mariodian (https://keybase.io/mariodian) on keybase.
* I have a public key ASC0J6i9yo6bj-yXWWv3J1y7Di3-EH4RBP4K_QTcbt92Hwo
To claim this, I am signing this object:
@mariodian
mariodian / openbazaar.conf
Created April 11, 2016 12:06
OpenBazaar upstart service
# Startup script for OpenBazaar Server that will auto-restart if crashed
# Copy this script to /etc/init folder
# "chmod 644 openbazaar.conf"
# Change "chdir", "setuid" and "setgid" according to your system
# Usage: "sudo service openbazaar start"
description "OpenBazaar Server"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
@mariodian
mariodian / btc.sh
Last active July 17, 2016 07:24
The Bitcoin Script. Currently supporting ticker with various currencies.
#!/bin/bash
if [ "$1" = "price" ]; then
currency=$([ "$2" = "" ] && echo "usd" || echo $2)
case $2 in
ltc)
pair="$2/usd"
;;
eur|*)
@mariodian
mariodian / agreement.md
Last active July 21, 2016 11:49 — forked from tyler-smith/agreement.md
OpenBazaar Moderation Agreement

@mariodian OpenBazaar Moderation Agreement

Author Version Last Updated
Tyler Smith 0.1.0 2016-04-18
Mario Dian 0.1.1 2016-07-21

Based on the moderation policy of @serp.

Goal

@mariodian
mariodian / openbazaar
Last active December 5, 2016 10:33
OpenBazaar sysv service
#! /bin/bash
### BEGIN INIT INFO
# Provides: openbazaar
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop openbazaar server
# Description: Start the openbazaar server as a specified user
### END INIT INFO
[Unit]
Description=NoIP update client
After=network.target
[Service]
Type=forking
User=pi
Group=pi
ExecStart=/usr/local/bin/noip2
#!/bin/sh
# Create log file
LOG="/tmp/ip-check.log"
touch $LOG
IP="$(dig +short myip.opendns.com @resolver1.opendns.com)"
LAST_IP="$(cat $LOG)"
if [ "$IP" != "$LAST_IP" ]; then
@mariodian
mariodian / ob.sh
Last active April 12, 2017 04:57
Handle OB server daemon
#!/bin/bash
ARGS="start -d -a 0.0.0.0"
cd /home/pi/source/OpenBazaar-Server
if [ "$1" = "start" ]; then
echo "OB Server starting..."
rm -rf /tmp/openbazaard.pid
@mariodian
mariodian / electrumx.conf
Created May 16, 2017 02:05
ElectrumX config for Linux
DAEMON_URL = http://<bitcoin.conf rpcuser>:<bitcoin.conf rpcpassowrd>@localhost:8332/
DB_DIRECTORY = /home/bitcoin/.electrumx/
DB_ENGINE = leveldb
USERNAME = bitcoin
ELECTRUMX = /home/bitcoin/source/electrumx/electrumx_server.py
HOST = 0.0.0.0
ANON_LOGS = "fuck off :)"
BANNER_FILE = /home/bitcoin/.electrumx/banner.txt
DONATION_ADDRESS = 1x1UnfVJu7cprs3E2jjQ9WRcdDi5KJxAU