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
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
@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 / obsetup.sh
Created May 8, 2016 09:44
OpenBazaar Server installation script for Ubuntu
#!/bin/bash
# Run: "chmod u+x obsetup.sh" before running the script
user=$(whoami)
dir=$(pwd)
if [ $user = 'root' ]; then
echo "Please run this script as a regular user."
exit;
fi
@mariodian
mariodian / bitcoind.service
Created July 6, 2016 06:17
Bitcoind Systemd script
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target
[Service]
User=pi
Group=pi
Type=forking
PIDFile=/var/lib/bitcoind/bitcoind.pid
@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.service
Created August 31, 2016 17:10
Debian Systemd OpenBazaar Service
# Save as /lib/systemd/system/openbazaar.service
[Unit]
Description=OpenBazaar server
After=network.target auditd.service
[Service]
Type=forking
User=pi
Group=pi
PIDFile=/tmp/openbazaard.pid
@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