Skip to content

Instantly share code, notes, and snippets.

var fs = require('fs');
var locations = ['%APPDATA%\\Roaming\\namecoin\\namecoin.conf','%APPDATA%\\namecoin\\namecoin.conf','C:\\Users\\'+process.env.USER+'\\AppData\\Roaming\\Bitcoin\\bitcoin.conf'];
//var locations = [process.env.HOME + '/.namecoin/namecoin.conf','/Users/'+ process.env.USER +'/Library/Application Support/Namecoin/namecoin.conf'];
var worked = [];
for (var i = 0, len = locations.length; i < len; i++) {
var path = locations[i];
if (fs.existsSync(path)) {
worked.push(path);
console.log(i + ': ' + path);
};
@indolering
indolering / namecoind.conf
Last active August 29, 2015 13:57
Upstart script for Namecoin
#save as /etc/init/namecoind.conf
#sudo initctl reload-configuration
#sudo start namecoind
description "namecoind"
start on filesystem
stop on runlevel [!2345]
oom never
expect daemon
#!/bin/sh
# Based on http://jswiki.lab-01.com/wiki/doku.php?id=install-couch
echo "Downloading Linux build tools and Erlang"
sudo apt-get install libmozjs185-1.0 build-essential libicu-dev libcurl4-gnutls-dev libtool erlang-dev erlang zip -y
#sudo /sbin/ldconfig
#echo "Spidermonkey installed."
# Work on tmp directory
/**
* Saves record to appropriate container and inits $jsdns if needed.
* @param {Record} r DNS record to be saved.
* @param {function} callback Function to send response to.
*/
this.save = function(r, callback) {
callback = callback || function(m) {log.log(m)};
if (typeof r.$jsdns === 'undefined' || r.$jsdns === null) {
r = new Record(r.name, r.value);
}
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
The system is: Darwin - 12.5.0 - i386
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc
Build flags:
Id flags:
The output was:
0
---
- hosts: bits
remote_user: ubuntu
sudo: yes
vars:
http_port: 80
max_clients: 200
tasks:
- name: Add Repo
command: sh -c "echo 'deb http://download.opensuse.org/repositories/home:/p_conrad:/coins/xUbuntu_13.04/ ./' > '/etc/apt/sources.list.d/obs-pconrad-coins.list'"
BE BOLD IN YOUR EDITS! I seriously wrote this in <10 minutes and I am open to all comments/alternatives. The point isn’t to upset/reject Khal,
randy-waterhouse
“indolering you must be delicate in how you handle this since khalahan still possess the alert key and seriously who else could be lead dev at this stage?
czzstage?
indolering
It's not pulling contrib from Khal, the codebase remains in his "hands", Just the forum and website. And basically anyone else, he hasn't actively contributed [to the codebase] in months [AFAIK].
PLAY [bits] *******************************************************************
GATHERING FACTS ***************************************************************
ok: [i-46-149-18-47.compute.is-1.greenqloud.com]
TASK: [Add Repo] **************************************************************
changed: [i-46-149-18-47.compute.is-1.greenqloud.com] => {"changed": true, "cmd": ["sh", "-c", "echo 'deb http://download.opensuse.org/repositories/home:/p_conrad:/coins/xUbuntu_13.04/ ./' > '/etc/apt/sources.list.d/obs-pconrad-coins.list'"], "delta": "0:00:00.003253", "end": "2014-01-04 21:37:56.994752", "rc": 0, "start": "2014-01-04 21:37:56.991499", "stderr": "", "stdout": ""}
TASK: [Add Key] ***************************************************************
ok: [i-46-149-18-47.compute.is-1.greenqloud.com] => {"changed": false}
<?php
error_reporting(E_ALL);
require_once 'jsonRPCClient.php';
header("Content-Type:application/json");
header("Access-Control-Allow-Origin: *");
$bitcoin = new jsonRPCClient('http://user:[email protected]:port/');
$output = -1;