Uncategorized

Installing & Running the Ethereum TestRPC

Check version: node -v npm -v Install : npm install -g ethereumjs-testrpc Run testrpc CD to your project npm init npm install ethereum/web3.js –save Switch over to the Remix IDE, click on the Run tab, and then change the Environment dropdown from Javascript VM to Web3 Provider. Hit “OK” and then specify the testrpc localhost address (by default,… Continue reading Installing & Running the Ethereum TestRPC

Uncategorized

Get IP local by javascript code

window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; var pc = new RTCPeerConnection({iceServers:[]}), noop = function(){}; pc.createDataChannel(“”); pc.createOffer(pc.setLocalDescription.bind(pc), noop); pc.onicecandidate = function(ice){ if(!ice || !ice.candidate || !ice.candidate.candidate) return; var localIP = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/.exec(ice.candidate.candidate)[1]; document.getElementById(‘ip’).innerText = localIP; pc.onicecandidate = noop; };

Uncategorized

php intl extension php

1) Use “port” to install php71-intl % sudo port install php71-intl (2) Copy intl.so into active php extensions directory % sudo cp /opt/local/lib/php/extensions/no-debug-non-zts-20090626/intl.so /usr/lib/php/extensions/no-debug-non-zts-20090626 (3) Add “extension=intl.so” into php.ini % emacs /etc/php.ini % diff /etc/php.ini~ /etc/php.ini 1018a1019 > extension=intl.so (4) Restart apache % sudo apachectl restart

Uncategorized

php71 osx problem

# 1. Install brew –> http://brew.sh/ # 2. run the following commands in your Terminal brew tap homebrew/dupes brew tap homebrew/versions brew tap homebrew/homebrew-php brew install –with-openssl curl brew install –with-homebrew-curl –with-apache php71 brew install php71-mcrypt php71-imagick # 3. Follow these instructions to make Apache and php-cli use the newer php executable and make the… Continue reading php71 osx problem