- https://ethereum.gitbooks.io/frontier-guide/content/connecting.html
- https://github.com/ethereum/wiki/wiki/JSON-RPC
- https://github.com/ethereum/go-ethereum/wiki/Managing-your-accounts
- https://coinsutra.com/ethereum-gas-limit-gas-price-fees/
- Ether = Tx Fees = Gas Limit * Gas Price
- Usually: 21000 * 20Gwei
- https://ethgasstation.info/ #check gas live
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create account admin | |
sudo rabbitmqctl add_user test test | |
sudo rabbitmqctl set_user_tags test administrator | |
sudo rabbitmqctl set_permissions -p / test ".*" ".*" ".*" | |
2. Declare Queue | |
sudo rabbitmqadmin declare queue name=my-new-queue durable=true | |
3. Publish message to queue | |
sudo rabbitmqadmin publish routing_key="queue" payload="hello, world" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# these action should be run with sudo level | |
# activate management plugin first | |
rabbitmq-plugins enable rabbitmq_management | |
# restart the rabbitmq-server | |
service rabbitmq-server restart | |
# download the rabbitmqadmin script locally |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bip39 = require("bip39"); | |
const bip32 = require("ripple-bip32"); | |
const ripple = require('ripplelib') | |
const sign = require('ripple-sign-keypairs') | |
var mnemonic = 'novel matter final only nice cheese address cradle civil crash great flame struggle consider crowd surface purpose saddle mango endless mixed trial tape wrap' | |
// Or generate: | |
// mnemonic = bip39.generateMnemonic() | |
console.log('mnemonic: ' + mnemonic) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get YouTube ID from various YouTube URL | |
# Ruby port from JavaScript version: https://gist.github.com/takien/4077195/ | |
def get_youtube_id(url) | |
id = '' | |
url = url.gsub(/(>|<)/i,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/) | |
if url[2] != nil | |
id = url[2].split(/[^0-9a-z_\-]/i) | |
id = id[0]; | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VideoEmbedUrlGenerator | |
REGEX_ID = %r{(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/|vimeo\.com\/)([a-zA-Z0-9_-]{8,11})}.freeze | |
REGEX_PROVIDER = /(youtube|youtu\.be|vimeo)/.freeze | |
def initialize(url) | |
@url = url | |
end | |
def construct_iframe | |
'<iframe '\ |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
brew cask install ngrok
The easiest way to use ngrok to tunnel into your localhost is if your local project is running on a specific port (e.g. not using named vhosts). You just run ngrok http [port number]
.
You can quickly boot up a local webserver using ruby. cd
into the project's root directory and run ruby -run -e httpd . -p [port number]
.
OlderNewer