Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Gautam Anand serganus

🎯
Focusing
View GitHub Profile
@serganus
serganus / eos-dish2018-dev-setup-101
Last active Nov 23, 2018
DISH 2018 - Setup and general queries
View eos-dish2018-dev-setup-101
1. Get yourself a docker
https://www.docker.com/get-started
2. Create a local working directory
mkdir contracts
3. Download eos docker image
@serganus
serganus / docker-node-ubuntu.txt
Last active Nov 8, 2018
Run Ubuntu Container - Node
View docker-node-ubuntu.txt
docker network create nodenet
docker run --name ubuntunode8 -d -p 3000:3000 --network nodenet -v C:\ubuntunode\home:/home ubuntu /bin/bash
@serganus
serganus / deferred.txt
Last active Jul 23, 2018
Communication Models
View deferred.txt
-----------------------------
test.hpp
-----------------------------
#ifndef TEST_HPP
#define TEST_HPP
#include <eosiolib/asset.hpp>
#include <eosiolib/eosio.hpp>
#include <eosiolib/transaction.hpp>
@serganus
serganus / 01-docker101.txt
Last active Nov 8, 2018
EOSIO Setup for development (OSX)
View 01-docker101.txt
(a) Show images
docker image ls
(b) Show containers
docker container ls
(c) Access docker bash for a container
docker exec -it $CONTAINERID /bin/bash
(c) More
@serganus
serganus / instructions.txt
Created Jan 31, 2018
Install MongoDB on Windows 10
View instructions.txt
- Download latest community version: https://www.mongodb.com/download-center#community
- create two folders: D:\data\db and D:\data\log
- create a configuration file: attached below
- Install windows service: /path/to/mongod.exe --config "D:\data\mongod.cfg" --install
- Start service: net start MongoDB
- Stop service: net stop MongoDB
- Remove windows service: /path/to/mongod.exe --remove
@serganus
serganus / operations.txt
Created Dec 18, 2017
Common Linux Commands
View operations.txt
# Copy using progress bar
sudo apt-get install pv
pv my_big_file > backup/my_big_file
#Copy using file status
rsync -ah --progress source-file destination
@serganus
serganus / Info.txt
Last active Dec 8, 2017
Linux System Resources (RedHAT)
View Info.txt
# Processor Model name
cat /proc/cpuinfo | grep 'model name' | uniq
# Total physical processor sockets in your machine
grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l
# Total RAM
cat /proc/meminfo | grep MemTotal
# Total Disk space
@serganus
serganus / errors.text
Created Dec 7, 2017
npm errors (documented)
View errors.text
(a) TypeError: Cannot read property '0' of undefined
Solution:
```
npm install npm@5.2.0 -g
npm cache clean --force
npm install
```
@serganus
serganus / app.js
Created Nov 17, 2017
Multiple Requests (Promisified)
View app.js
var __request = require('./logic.js').__request;
var urls = ["http://www.example.com/firts", "http://www.example.com/second", "http://www.example.com/third"];
__request(urls, 'GET', false);
@serganus
serganus / Install node using nvm
Created Nov 16, 2017
Install / Uninstall Node on OSX
View Install node using nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | sudo bash
nvm install node
nvm run node --version