Skip to content

Instantly share code, notes, and snippets.

@blueplanet
blueplanet / bitcoind-ubuntu-install
Created June 17, 2020 11:58 — forked from rjmacarthy/bitcoind-ubuntu-install
Install Bitcoind Ubuntu
** Add repository and install bitcoind **
sudo apt-get install build-essential
sudo apt-get install libtool autotools-dev autoconf
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind
mkdir ~/.bitcoin/ && cd ~/.bitcoin/
@blueplanet
blueplanet / add-new-crypto-to-peatio.md
Last active September 12, 2017 20:19 — forked from brossi/add-new-crypto-to-peatio.md
Adding A New Cryptocurrency to Peatio

State: Draft
Based on the Peatio Stable branch


Coin Daemon

To the coin daemon's {coin}.conf file, include the -walletnotify command:

# Notify when receiving coins
@blueplanet
blueplanet / ecdsa_example.rb
Created August 19, 2017 14:19 — forked from ostinelli/ecdsa_example.rb
ECDSA usage from Ruby.
require 'openssl'
require 'base64'
# ===== \/ sign =====
# generate keys
key = OpenSSL::PKey::EC.new("secp256k1")
key.generate_key
public_key = key.public_key
public_key_hex = public_key.to_bn.to_s(16).downcase # public key in hex format
@blueplanet
blueplanet / README.md
Created January 17, 2017 07:58 — forked from hidakatsuya/README.md
Barby で作ったバーコードのサイズを調整する方法

Barby で作ったバーコードのサイズを調整するサンプルコード

動作確認環境

  • Mac OSX 10.8
  • Ruby 2.0.0-p195
  • ThinReports 0.7.6
  • barby 0.5.1
  • chunky_png 1.2.8
require 'zeus/rails'
class CustomPlan < Zeus::Rails
def spec(argv=ARGV)
# disable autorun in case the user left it in spec_helper.rb
RSpec::Core::Runner.disable_autorun!
exit RSpec::Core::Runner.run(argv)
end
end
{
"cmd": ["/Users/ecerulm/bin/sublime_rvm.rb", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.ruby"
}
# coding: utf-8
class AddCountCacheToPublications < ActiveRecord::Migration
def change
add_column :publications, :concerns_count, :integer, null: false, default: 0
add_column :publications, :publication_comments_count, :integer, null: false, default: 0
Publication.reset_column_information
Publication.all.each do |p|
Publication.update_counters p.id, concerns_count: p.concerns.count, publication_comments_count: p.publication_comments.count
end
@blueplanet
blueplanet / rails_start.scpt
Created October 24, 2012 06:53 — forked from rapimo/rails_start.scpt
iterm2 AppleScript for my Rails Project
-- ~/Library/Application\ Support/iTerm/Scripts/setup_rails.scpt
-- Thanks to http://www.worldgoneweb.com/2011/iterm2-advanced-features/#comment-20560
-- http://www.iterm2.com/#/section/documentation/scripting
tell application "iTerm"
activate
set myterm to (make new terminal)
set cd_to_my_project_path to ("cd ~/Projekte/my_awesome_project")
-- you can altenativly tell the first terminal
tell the first terminal
launch session "Panes"
@blueplanet
blueplanet / syntax_highlighting.py
Created July 12, 2012 12:48 — forked from JeanMertz/syntax_highlighting.py
Ruby on Rails syntax highlight switcher for Sublime Text 2
import sublime, sublime_plugin
import os
class DetectFileTypeCommand(sublime_plugin.EventListener):
""" Detects current file type if the file's extension isn't conclusive """
""" Modified for Ruby on Rails and Sublime Text 2 """
""" Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """
def on_load(self, view):
filename = view.file_name()