Skip to content

Instantly share code, notes, and snippets.

View Vishwas1's full-sized avatar
🎯
Focusing

Vishwas Anand Bhushan Vishwas1

🎯
Focusing
View GitHub Profile

Using android Keystore

Importing keystore

//TODO: import keystore in the project

Setting up postgres in stellar with UNIX socket

  • Setup UNIX socket in with stellar postgres db
  • sudo systemctl stop postgresql
  • Update the file sudo vi /etc/postgresql/9.5/main/pg_hba.conf with local core stellar md5
  • Update the db connection string in stellar-core.cfg with DATABASE="postgresql://dbname=core host=/var/run/postgresql user=stellar password=stellar"
  • sudo systemctl start postgresql
  • restart the stellar-core

Setting up stellar with sqllite

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>hanko-plugin-keycloak-parent</artifactId>
<groupId>io.hanko.plugins.keycloak</groupId>
<version>0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>HANKO Plugin Keycloak EJB</name>
  • I wanted to learn Kalaripayattu - took 1 month leave from office.
  • Took flight to Kochi from Chennai.
  • It was a small village in rainforest in a place called Athirapally in Kerala.
  • This place was full of jungle, waterfalls and small tribal villages.
  • A tribal man took me into the jungle where there was Kalari - the school to learn Kalaripayattu
  • It was big room - lot of weapons - few people were practising
  • Met a woman, Paravathi - tall, strong, brown in color, bold and big eyes. I looked at her biceps. - she was no less than a warrior.
  • I was wondering is it really needed in this 21st century ? What about our army ? It looks like they are preparing for war. As usual I had many unanswered questions.
  • She took me to her house - a small hut with granny inside. She told me to get sleep and wake up at 3 AM in the morning for practise.
  • Granny told me stories about Kalaripayattu - how britishers banned that artform and came to the village in the search of that book. A book? What book? I asked
@Vishwas1
Vishwas1 / poll_timer.js
Last active July 8, 2019 04:29
Reactive programming polling
const { from, timer } = require('rxjs');
const fetch = require('node-fetch');
const getTimeFromAPI = () => {
return fetch('http://worldclockapi.com/api/json/est/now')
.then((resp) => resp.json())
}
// Observer timer and subscribe
@Vishwas1
Vishwas1 / introrx.md
Created July 3, 2019 06:14 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@Vishwas1
Vishwas1 / zagg-node-sync-problem.md
Last active June 10, 2019 07:09
Zagg multi node sync problem and possible solutions

Zagg multi node sync problem and possible solutions

Problem :

Zagg multi node sync (for bitcoin blocks) won’t work since we were not making level dbs sync to each other.

  • Setup 2 node zagg network using stellar’s configurations
  • Throw transaction with Account Marker operation (for bitcoin transaction HEX) over one of the node.
  • The operation has to go through validation from Bitcoin code base using doValidate() of the operation.
  • After getting all the operations validated, the transaction goes into mPendingTransaction (which is nothing but memepool for stellar.)

Find unspents

listunspents

[...]

Create Transaction

As you can see network is running

CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                                                                    NAMES
b33ee58cff04        hyperledger/fabric-peer:1.4.0       "peer node start --p…"   2 minutes ago       Up 2 minutes        0.0.0.0:7151->7051/tcp, 0.0.0.0:7152->7052/tcp, 0.0.0.0:7153->7053/tcp   peer0.org2.hurley.lab
4e5f88113b8c        hyperledger/fabric-peer:1.4.0       "peer node start --p…"   2 minutes ago       Up 2 minutes        0.0.0.0:7051-7053->7051-7053/tcp                                         peer0.org1.hurley.lab
e486d8bb7d29        hyperledger/fabric-couchdb:0.4.14   "tini -- /docker-ent…"   2 minutes ago       Up 2 minutes        4369/tcp, 9100/tcp, 0.0.0.0:5184->5984/tcp                               couchdb.peer0.org2.hurley.lab
cb3d0de40305        hyperledger/fabric-ca:1.4.0         "fabric-ca-server st…"   2 minutes ago       Up 2 minutes        0.0.0.0

Hurl

  • hurl is a tool create hyperledger easily. Its just a wrapper over native HL fabric.
  • Analogy to hurl could be Ganache.
  • After network creation via hurl, we can see the configurations files in the folder:

Install Hurl

sudo npm install -g @worldsibu/hurley --unsafe-perm=true