Skip to content

Instantly share code, notes, and snippets.

@vyachin
vyachin / gist:ce515be700caf83a57f471f1432e174d
Last active June 13, 2019 06:10
golang protobuf livecoin
package main
import (
"awesomeProject/protobuf_ws"
"crypto/hmac"
"crypto/sha256"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"github.com/gorilla/websocket"
provider "yandex" {
token = ""
cloud_id = ""
folder_id = ""
zone = ""
}
variable "instance_root_disk" {
default = "20"
}
@vyachin
vyachin / gist:7ed736a499434d77fbf93e1c7401e6bf
Last active August 5, 2022 09:34
Загрузка файла на сервер, средствами 1С
&НаСервере
Функция ПодключитьсяКHTTPСерверу(Организация) Экспорт
Результат = ПолучитьДанныеПодключения(Организация, Перечисления.РИТ_ВидПодключения.HTTP);
Если Результат.Порт = "" Тогда
Порт = 0;
Иначе
Порт = Число(Результат.Порт);
КонецЕсли;
@vyachin
vyachin / main.dart
Created October 27, 2021 21:33
flutter bottom sheet
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
body: Builder(
builder: (BuildContext context) {
final size = MediaQuery.of(context).size;
return Stack(
@vyachin
vyachin / MainActivity.kt
Last active October 27, 2024 12:57
Jetpack Compose Navigation example
package com.example.app
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
@vyachin
vyachin / MainActivity.kt
Created October 27, 2024 12:15
Jetpack compose view model
package com.example.myapplication
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.Scaffold