Skip to content

Instantly share code, notes, and snippets.

View kostyay's full-sized avatar

Kostya Ostrovsky kostyay

View GitHub Profile
@kostyay
kostyay / download_zwift_updates.py
Last active January 25, 2019 18:33
Python script to download Zwift updates. Fixes the Z113 error/ Update failure "at line 594 in patcher.cpp"
#
# To use make sure to install the following packages:
# pip install requests pyOpenSSL ndg-httpsclient pyasn1
#
import sys
import xml.etree.ElementTree as ET
#import ipdb
import requests
@kostyay
kostyay / FoxitReaderFedora26
Created July 27, 2017 08:11
How to get Foxit Reader to run on Fedora 26
cd ~/opt/foxitsoftware/foxitreader
ln -s /lib64/libssl.so.10 lib/libssl.so.1.0.0
ln -s /lib64/libcrypto.so.10 lib/libcrypto.so.1.0.0
@kostyay
kostyay / protorepo
Last active April 3, 2020 13:40
proto single repo
├───github.com
│ ├───stackpulse
│ │ ├───service1
│ │ ├───service2
│ │ └───service3
│ └───thirtparty
│ └───project
└───google
@kostyay
kostyay / prototool.json
Created April 3, 2020 13:41
StackPulse prototool configuration
{
"excludes": [
"protodep",
"js"
],
"protoc": {
"version": "3.11.4",
"includes": [
"/project",
@kostyay
kostyay / protodep.toml
Created April 3, 2020 15:02
Example protodep.toml file
proto_outdir = "./protodep"
[[dependencies]]
target = "github.com/mwitkow/go-proto-validators"
branch = "master"
path = "github.com/mwitkow/go-proto-validators"
ignores = ["./test", "./examples"]
[[dependencies]]
target = "github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api"
@kostyay
kostyay / time_service.proto
Created September 26, 2020 16:20
Time Service
syntax = "proto3";
package smpl.time.api.v1;
option go_package = "github.com/kostyay/grpc-web-example/api/time/v1";
message GetCurrentTimeRequest {
}
message GetCurrentTimeResponse {
@kostyay
kostyay / main.go
Created September 26, 2020 16:31
time-server
package main
import (
"context"
"log"
"net"
"time"
pb "github.com/kostyay/grpc-web-example/time/goclient/time/v1"
"google.golang.org/grpc"
@kostyay
kostyay / client.js
Created September 26, 2020 16:34
grpc-web javascript
// Import the client and the message definition
import { TimeServiceClient } from '../jsclient/time/v1/time_service_grpc_web_pb';
import { GetCurrentTimeRequest } from '../jsclient/time/v1/time_service_pb';
// Connect to the gprc-web server
const client = new TimeServiceClient("http://localhost:8080", null, null);
// This is a neat chrome extension that allows you to spy on grpc-web traffic just like you would on normal traffic.
// You can find it here: https://chrome.google.com/webstore/detail/grpc-web-developer-tools/ddamlpimmiapbcopeoifjfmoabdbfbjj?hl=en
const enableDevTools = window.__GRPCWEB_DEVTOOLS__ || (() => {});
enableDevTools([
@kostyay
kostyay / envoy.yaml
Created September 26, 2020 16:39
Envoy configuration
admin:
access_log_path: /dev/stdout
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }
static_resources:
listeners:
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 8080 }
/BTS7960 motor driver sketch
int R_IS = 1;
int R_EN = 2;
int R_PWM = 3;
int L_IS = 4;
int L_EN = 5;
int L_PWM = 6;
void setup() {