Skip to content

Instantly share code, notes, and snippets.

{
"chain": "main",
"blocks": 0,
"headers": 16000,
"bestblockhash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
"difficulty": 1,
"mediantime": 1231006505,
"verificationprogress": 3.715029412543562e-09,
"chainwork": "0000000000000000000000000000000000000000000000000000000100010001",
"pruned": false,
# Generated by https://jlopp.github.io/bitcoin-core-config-generator/
# This config should be placed in following path:
# ~/.bitcoin/bitcoin.conf
# [core]
# Specify a non-default location to store blockchain and other data.
datadir=/mnt/volume-lon1-03-part1/Bitcoin
# Set database cache size in megabytes; machines sync faster with a larger cache. Recommend setting as high as possible based upon machine's available RAM.
dbcache=1000
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target
[Service]
User=bitcoin
Group=bitcoin
Type=forking
PIDFile=/mnt/volume-lon1-03-part1/Bitcoin/bitcoind.pid
bitcoin@bitcoin-full-node-1:~# bitcoind --version
Bitcoin Core Daemon version v0.15.0.0-g3751912e8e
Copyright (C) 2009-2017 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org> for further information about the software.
The source code is available from <https://github.com/bitcoin/bitcoin>.
This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
sudo apt-add-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind
sudo parted /dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03 mklabel gpt
sudo parted -a opt /dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03 mkpart primary ext4 0% 100%
sudo mkfs.ext4 /dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03-part1
sudo mkdir -p /mnt/volume-lon1-03-part1
echo '/dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03-part1 /mnt/volume-lon1-03-part1 ext4 defaults,nofail,discard 0 2' | sudo tee -a /etc/fstab
sudo mount -a
sudo chmod 777 /mnt/volume-lon1-03-part1
# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/eric/.ssh/id_rsa): /Users/eric/.ssh/digital_ocean_droplet
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/eric/.ssh/digital_ocean_droplet.
Your public key has been saved in /Users/eric/.ssh/digital_ocean_droplet.pub.
The key fingerprint is:
SHA256:TyU/FF3Z7bOS2MgIgTLu6yJBKkuOYUcMj6YjNJKq5a8 eric@Erics-MacBook-Pro-4.local
The key's randomart image is:
@ericallam
ericallam / application_service.rb
Created July 30, 2017 10:28
ApplicationService running a retryable REPEATABLE READ transaction
def call(form, attempts_count = 0, &block)
return block.call(form).unwrap unless transaction_handler.enabled?
return transaction_handler.transaction { block.call(form).unwrap } if nested_transaction_detector.call
if attempts_count < max_attempts
begin
attempts_count = attempts_count + 1
transaction_handler.transaction(isolation: :repeatable_read) { block.call(form, attempt: attempts_count).unwrap }
rescue Survivor::Adapters::Error => error
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:Get*",
"s3:List*",
"s3:Put*"
],
@ericallam
ericallam / AppComponent.js
Last active December 25, 2018 20:41
Getting React Native's Navigator and Relay to work together
import Relay, {
RootContainer,
Route
} from 'react-relay'
class SeasonRoute extends Route {
static paramDefinitions = {};
static queries = {
currentSeason: () => Relay.QL`query { currentSeason }`,