Skip to content

Instantly share code, notes, and snippets.

@amitkumarj441
amitkumarj441 / v.py
Created January 28, 2018 16:47
Make vyper easy
from web3 import Web3, HTTPProvider
from viper import compiler
from web3.contract import ConciseContract
from time import sleep
example_contract = open('./path/to/contract.v.py', 'r')
contract_code = example_contract.read()
example_contract.close()
cmp = compiler.Compiler()
@amitkumarj441
amitkumarj441 / tests.log
Last active September 16, 2017 07:57
Stress Testing
ith@ith-ThinkPad-W520:~$ ssh root@192.168.121.2
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Wed Sep 13 07:54:16 BST 2017
System load: 4.1
Usage of /: 36.7% of 730.35GB
Memory usage: 43%
@amitkumarj441
amitkumarj441 / openvpn.log
Created August 26, 2017 11:28
openvpn connection failing
ith@ith-ThinkPad-W520:~$ openvpn --verb 5 --dev tun ~/Downloads/unhiol_opnfv.conf
Sat Aug 26 16:55:00 2017 us=257036 Current Parameter Settings:
Sat Aug 26 16:55:00 2017 us=257110 config = '[UNDEF]'
Sat Aug 26 16:55:00 2017 us=257143 mode = 0
Sat Aug 26 16:55:00 2017 us=257170 persist_config = DISABLED
Sat Aug 26 16:55:00 2017 us=257193 persist_mode = 1
Sat Aug 26 16:55:00 2017 us=257217 show_ciphers = DISABLED
Sat Aug 26 16:55:00 2017 us=257238 show_digests = DISABLED
Sat Aug 26 16:55:00 2017 us=257257 show_engines = DISABLED
Sat Aug 26 16:55:00 2017 us=257279 genkey = DISABLED
@amitkumarj441
amitkumarj441 / fluent.log
Created August 25, 2017 13:38
Fluentd Pod log
[root@viaq ~]# oc logs -f logging-fluentd-lqf3n
+ fluentdargs=-vv
+ echo '>>>>>> ENVIRONMENT VARS <<<<<'
+ env
+ sort
>>>>>> ENVIRONMENT VARS <<<<<
DATA_VERSION=1.6.0
ES_CA=/etc/fluent/keys/ca
ES_CLIENT_CERT=/etc/fluent/keys/cert
ES_CLIENT_KEY=/etc/fluent/keys/key
[root@viaq ~]# oc get pod logging-fluentd-cvfnp -o yaml
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/created-by: |
{"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"DaemonSet","namespace":"logging","name":"logging-fluentd","uid":"6261e57b-574b-11e7-8b3f-000c293d9bc2","apiVersion":"extensions","resourceVersion":"32615"}}
openshift.io/scc: privileged
creationTimestamp: 2017-08-25T11:56:19Z
generateName: logging-fluentd-
@amitkumarj441
amitkumarj441 / vPOD.log
Created August 25, 2017 13:16
vPOD login
root@ith-ThinkPad-W520:/home/ith/Downloads# openvpn unhiol_opnfv.conf
Fri Aug 25 18:43:10 2017 OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2017
Fri Aug 25 18:43:10 2017 library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
Enter Auth Username: *******
Enter Auth Password: ***************
Fri Aug 25 18:43:40 2017 Socket Buffers: R=[87380->87380] S=[16384->16384]
Fri Aug 25 18:43:40 2017 Attempting to establish TCP connection with [AF_INET]132.177.125.250:1194 [nonblock]
Fri Aug 25 18:43:41 2017 TCP connection established with [AF_INET]132.177.125.250:1194
Fri Aug 25 18:43:41 2017 TCPv4_CLIENT link local: [undef]
Fri Aug 25 18:43:41 2017 TCPv4_CLIENT link remote: [AF_INET]132.177.125.250:1194
@amitkumarj441
amitkumarj441 / fluentd_filter.log
Created August 25, 2017 12:01
Fixing Fluentd filter
[root@viaq ~]# oc get ds
NAME DESIRED CURRENT READY NODE-SELECTOR AGE
logging-fluentd 1 1 1 logging-infra-fluentd=true 63d
[root@viaq ~]# oc env ds/logging-fluentd VERBOSE=true
daemonset "logging-fluentd" updated
[root@viaq ~]# oc get cm
NAME DATA AGE
logging-curator 1 63d
logging-elasticsearch 2 63d
logging-fluentd 5 63d
@amitkumarj441
amitkumarj441 / eth.doc
Last active July 30, 2018 05:06
Ethereum Mining Setup
Check https://www.meebey.net/posts/ethereum_gpu_mining_on_linux_howto/
For Claymore setup:
https://bitcointalk.org/index.php?topic=1433925.0
http://1stminingrig.com/tutorial-ethereum-mining-rig-part-4-ethos-installation/
https://www.cryptocompare.com/mining/guides/how-to-mine-ethereum/
@amitkumarj441
amitkumarj441 / router.log
Last active June 23, 2017 13:22
oc description and running kibana
[root@viaq openshift-ansible]# oc get pods
NAME READY STATUS RESTARTS AGE
docker-registry-1-deploy 0/1 Error 0 23h
registry-console-1-rjb0f 1/1 Running 1 23h
router-1-deploy 0/1 Error 0 23h
router-2-16rnl 0/1 ContainerCreating 0 7s
router-2-deploy 1/1 Running 0 10s
[root@viaq openshift-ansible]# oc describe po router-2-16rnl
Name: router-2-16rnl
Namespace: default
@amitkumarj441
amitkumarj441 / oc.log
Last active June 23, 2017 11:46
OpenShift 1.5 status
[root@viaq openshift-ansible]oc status
In project logging on server https://viaq.logging.test:8443
svc/logging-es - 172.30.39.221:9200 -> restapi
dc/logging-es-7vo926zw deploys docker.io/openshift/origin-logging-elasticsearch:v1.5.1
deployment #2 deployed 18 hours ago - 1 pod
deployment #1 failed 22 hours ago: config change
svc/logging-es-cluster - 172.30.63.148:9300
dc/logging-es-7vo926zw deploys docker.io/openshift/origin-logging-elasticsearch:v1.5.1