Skip to content

Instantly share code, notes, and snippets.

sudo apt-add-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind
[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
# 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
@ericallam
ericallam / module_function.rb
Created September 12, 2011 23:13
Using module_function instead of extend self
# a lot of people in ruby do this
module Foo
extend self
def bar
'bar'
end
end
Foo.bar
@ericallam
ericallam / RotateKeynoteDocumentDroplet
Created July 31, 2014 11:12
Rotate Keynote Document for use as an app Prototype
// Open Script Editor and Export this as an Application
//
// Then drop a keynote file on it in the Finder and it will properly resize
// and rotate everything so the Keynote file becomes usable as a prototype
// in the iPhone keynote app
// rotateDocument exported function
//
// Accepts a Keynote document and will rotate
// all the slides and elements in the slide 90 degrees
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:Get*",
"s3:List*",
"s3:Put*"
],
#pragma message("Use new block-based API once rdar://15641270 has been fixed")
UI- and App Frameworks Evangelist - Jake Behrens, behrens@apple.com, twitter: @Behrens
- What's new in Cocoa
- Accessibility in iOS
- Building User Interfaces for iOS 7
- Getting Started with UIKit Dynamics
- What's new in Cocoa Touch
- What's New With Multitasking
- Best Practices for Cocoa Animation
- Improving Power Efficiency with App Nap
- Introducing Text Kit