Bluetooth activation at startup on arch linux

Why? You might not have reach that point yet but bluez has been deprecating hciconfig and other tools. In bluez 5.44, it’s not there anymore. What is the problem? All hciconfig udev rules to activate bluetooth at startup won’t work anymore. Most forum posts solving bluetooth issues are now outdated. Once I updated to bluez 5.44, my service leveraging hciconfig to activate bluetooth at startup didn’t work anymore! What is the solution?

   archlinux, bluetooth

Golang and Oracle

Which library To this day, the most up to date library seems to be rana/ora How to install (linux & macosx) Download Oracle Instant Client for linux x64: both packages Basic and SDK Unzip each of them in the same folder /opt/oracle mkdir -p /opt/oracle cd /opt/oracle unzip ~/Downloads/instantclient-basiclite-linux.x64-12.2.0.1.0.zip unzip ~/Downloads/instantclient-sdk-linux.x64-12.2.0.1.0.zip cd /opt/oracle/instantclient_12_1 Add the necessary env variables and paths: # Oracle export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH export PKG_CONFIG_PATH=/opt/oracle export ORACLE_HOME=$LD_LIBRARY_PATH copy from the go package .

   golang, oracle, linux, macosx, sql

Ethereum react dapps

I finished my first dapp with (react-boilerplate)[https://github.com/mxstbr/] this week and here are the few things I learnt. I won’t get into the redux, redux-saga details, I let you play with the amazing boilerplate. Interacting with constant functions Let’s use the typical balanceOf function of the EIP20 contracts: function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } Here are the sagas (redux-sagas) I used to interact: import { take, call, put, cancel, select, fork } from 'redux-saga/effects'; import { BALANCE_OF_GET, } from '.

   react, blockchain, ethereum, dev, dapps

Ethereum contracts and Golang

The contract contract Trigger { function () { throw; } address owner; function Trigger() { owner = msg.sender; } event TriggerEvt(address _sender, uint _trigger); function trigger(uint _trigger) { TriggerEvt(msg.sender, _trigger); } function getOwner() constant returns (address) { return owner; } } This is a very simple contract that we will take as an example. Getting the right tools for binding A good starting point is this wiki. You will need to follow the install procedure of go-ethereum.

   golang, blockchain, ethereum, dev, testrpc

Summary of UBER lessons on scaling microservices

I just watched that amazing videos from Matt Ranney Here are my takeaways and opinionated summary: Use RPC for service to service communications: gRPC seems to be a good way of tackling it Use many repositories Profiling should be unified: flamegraphs seem to be a good solution (Go profiling is great too) Premature optimization is bad but performance monitoring is crucial! Trace requests, keep context within all logs Log a lot, but only on a portion of your production architecture as logging can have a big cost.

   scaling, microservices, uber

Blockchain week in Shanghai!

I participated to the devcon2 and blockchain summit last week. Here is my summary!

   ethereum, blockchain, conference, devcon2

Ethereum first dapp - part 3

setting up a light wallet In order to have a setup close to what the DAPP would be, we will use (metamask) [http://www.metamask.io] as a light wallet (there are other choices). Metamask allows you to connect to a custom node. We will then connect to our node, http://localhost:9012 If everthing is fine, metamasks should indicate it’s connected. Then, we can import the metamask account to our local node by simply specifying the datadir we have setup the node data.

   ethereum, dapp, development, metamask

Ethereum first dapp - part 2

Frontend Prepare your folder for your dapp I will be using https://github.com/mxstbr/react-boilerplate as it’s quite nice and I’ve been playing with React for a bit now. I will not go into the details of setting this up, it’s a totally different topic. If you are not familiar with it, it’s probably a waste of time for you to read. Example web3 component with React This boilerplate uses immutable, redux and redux-sagas in order to deal with data.

   ethereum, dapp, development

Ethereum first dapp - part 1

Contracts Prepare your folder for your dapp mkdir dapp inside this folder, we’ll create one folder for truffle, one for geth. cd dapp mkdir truffle geth inside the geth folder, simply put the customGenesis block you can find in the ethereum-dev-environment blog post. We are going to use two Ethereum clients, one for tests and devs, testrpc and one for a more real interaction, geth. Let’s install truffle and testrpc

   ethereum, dapp, development

Interacting with an Ethereum smart contract

Check the address of the current deployed contract Remember when you mined your contract, it told your its address. Now, reuse it! eth.getCode("0x5f3425ccedeae0eb36521c4cf93ec6544dbad9bd") Test the contract with a simple interaction get the latest web3-light.min.js js from https://github.com/ethereum/web3.js/releases and simply copy the dist/web3-light.min.js into the same folder as the following HTML file. then, use this html to interact with your contract on the local node: <!doctype> <html> <head> <script type="text/javascript" src="https://cdnjs.

   blockchain, ethereum, smart contract, javascript, web3, dapp