Skip to content

Instantly share code, notes, and snippets.

View sivsivsree's full-sized avatar
👨‍💻
Focusing on Team building

Siv S sivsivsree

👨‍💻
Focusing on Team building
View GitHub Profile
#!/bin/bash
if [ -z $SUDO_USER ]
then
echo "===== Script need to be executed with sudo ===="
exit 0
fi
echo "=======Set up go======"
sudo apt-get update
sudo apt-get -y install golang-1.10-go
@sivsivsree
sivsivsree / sse.go
Created December 30, 2019 10:41 — forked from ismasan/sse.go
Example SSE server in Golang
// Copyright (c) 2017 Ismael Celis
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
@sivsivsree
sivsivsree / login-aws.sh
Created January 27, 2020 06:06
AWS LOGIN
$(aws ecr get-login --no-include-email --region us-east-2)
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"id": "http://example.edu/credentials/1872",
"type": ["VerifiableCredential", "AlumniCredential"],
{
"@context":[
"https://w3id.org/openbadges/v2",
"https://w3id.org/blockcerts/v2.1"
],
"type":"Assertion",
"id":"urn:uuid:bbba8553-8ec1-445f-82c9-a57251dd731c",
"badge":{
"id":"urn:uuid:82a4c9f2-3588-457b-80ea-da695571b8fc",
"type":"BadgeClass",
@sivsivsree
sivsivsree / sample.c
Created June 15, 2020 05:27
sample 1
#include <stdio.h>
int students = 1;
void getMarks(int *s1, int *s2, int *s3, int *s4, int *s5){
for(int i=0; i< students; i++) {
printf("student%d ", i+1);
printf("\nenter s1 mark: ");
scanf("%d", &s1[i]);
#include<stdio.h>
#define SIZE 3 // 3x3 matrix
int main()
{
int A[SIZE][SIZE];
int row, col, sum = 0;
int DSum = 0;
printf("Enter elements in matrix of size %dx%d: \n", SIZE, SIZE);
/*(()=>{let e="#shahada *{box-sizing:border-box;padding:0;margin:0;font-family:Tahoma,sans-serif}\n#shahada .grid{display:flex;font-family:Tahoma,sans-serif}\n#shahada .grid .grid-list ul{padding:16px}\n#shahada .grid .grid-list li{list-style:none;font-size:12px;margin-bottom:1.3em}\n#shahada .grid .grid-list li div{margin-bottom:.5em;text-overflow:ellipsis;line-break:anywhere;font-size:12px}\n#shahada .hr{border-top:1px solid #f1f2f3}\n#shahada .verified{padding:10px;box-sizing:border-box;border-left:3px solid;margin:16px}\n#shahada .is-success{background-color:rgba(42,178,123,0.1);border-color:#2ab27b}\n#shahada .is-error{background-color:rgba(245,17,17,0.1);border-color:#f90e0e}\n#shahada .check:before{display:inline-block;vertical-align:top;line-height:1em;width:1em;height:1em;margin-right:.3em;text-align:center;content:'✔';color:#2ab27b}\n#shahada .shahda-footer{height:50px;margin:10px}\n#shahada .shahda-footer img{height:100%}";const i=document.head||document.getElementsByTagName("head")[0],t=document.c
snap install docker
wget https://golang.org/dl/go1.15.1.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.15.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
source ~/.profile
cd /usr/local/
sudo mkdir hyperledger
cd hyperledger
curl -sSL http://bit.ly/2ysbOFE | sudo bash -s 1.4.6
{
"@context": {
"id": "@id",
"type": "@type",
"metadataJson": {
"@id": "https://schemas.learningmachine.com/2017/blockcerts/metadata",
"@type": "https://schemas.learningmachine.com/2017/types/text/json"
},
"displayHtml": {
"@id": "https://schemas.learningmachine.com/2017/blockcerts/displayHtml",