Skip to content

Instantly share code, notes, and snippets.

@bdunbar
bdunbar / openbazaar_backup.sh
Created February 19, 2017 21:40
Backup script for OpenBazaar server
#!/bin/bash
# backup of Open Bazaar '.' directory
set -u
set -e
TIME=`date +%b-%d-%y`
FILENAME=OB-backup-$TIME.tar.gz
SRCDIR={{ openbazaar_user_home_directory }}
Verifying that "storefore.id" is my Blockstack ID. https://onename.com/storefore
2016-07-07T02:31:29.694258+00:00 heroku[slug-compiler]: Slug compilation finished
2016-07-07T02:31:31.098248+00:00 heroku[web.1]: Starting process with command `node ./node_modules/flatmarket-server/lib/start`
2016-07-07T02:31:33.079083+00:00 app[web.1]: ^
2016-07-07T02:31:33.080285+00:00 app[web.1]: SyntaxError: Unexpected token h
2016-07-07T02:31:33.078853+00:00 app[web.1]: undefined:1
2016-07-07T02:31:33.080313+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/flatmarket-server/lib/start.js:4:51)
2016-07-07T02:31:33.080324+00:00 app[web.1]: at Module._compile (module.js:456:26)
2016-07-07T02:31:33.080335+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2016-07-07T02:31:33.078729+00:00 app[web.1]:
2016-07-07T02:31:33.080337+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
#flatmarket.json
...
"server": {
"host": "protected-savannah-97205.herokuapp.com"
},
"stripe": {
"allowRememberMe": false,
"billingAddress": true,
"panelLabel": "Buy now {{amount}}",
"publishableKey": "pk_test_JQ90RZgiRAfNbKyeQSHjkRTM",
### Keybase proof
I hereby claim:
* I am bdunbar on github.
* I am bdunbar (https://keybase.io/bdunbar) on keybase.
* I have a public key ASB5Pwvp3XqW9saJ0L72T_IWI8gfVtkunNEyQFxMSscoPwo
To claim this, I am signing this object:
Verifying that +bdunbar is my blockchain ID. https://onename.com/bdunbar
@bdunbar
bdunbar / gist:82f55ed4f1de76cd3d6e
Created October 24, 2014 20:42
playbook and failure to understand a thing on Friday
0. I want a playbook to execute an include if a value is True but to execute other includes if value is False.
1. This works
role\sftp\tasks\main.yml
- { include: configure.yml, tags: ['configure'] }
- { include: cic_users.yml, tags: ['cic_users'] }
2. But what I want to do is add a conditional. So that if variable foo is true it executes an include but the others do not execute.
http://www.microsoft.com/Downloads/details.aspx?familyid=6E1EC93D‐BDBD‐4983‐92F7‐
479E088570AD&displaylang=en
@bdunbar
bdunbar / gist:6b60d8a14e5ef2af8ebe
Created May 28, 2014 16:21
Password creation and not getting it
A thing I'm not getting.
# user.yml
- name: Register a password
shell: mkpasswd -s 0
register: password
when: ansible_os_family == "Debian"
- name: Create External User
user:
The Big Question. Run this playbook many times. Why is output, always, from one item 'changed' and one 'ok'?
# tasks/external_user_multi.yml
(snip)
- name: Maintain External Multi root user
user:
name: '{{ item.name }}'
group: '{{ item.name }}'