Skip to content

Instantly share code, notes, and snippets.

View ahndmal's full-sized avatar
😔
stand with my homeland Ukraine

Andrii Maliuta ahndmal

😔
stand with my homeland Ukraine
View GitHub Profile
package main
import (
"context"
"encoding/csv"
"fmt"
"log"
"os"
"strings"
"sync"
@ahndmal
ahndmal / ascii-colors.txt
Last active December 1, 2023 13:06
ascii colors
Black: \u001b[30m
Red: \u001b[31m
Green: \u001b[32m
Yellow: \u001b[33m
Blue: \u001b[34m
Magenta: \u001b[35m
Cyan: \u001b[36m
White: \u001b[37m
Reset: \u001b[0m
plugins {
id("java")
kotlin("jvm") version "1.9.0-Beta"
}
group = "com.andmal"
version = "0.0.1"
repositories {
mavenCentral()
import java.time.Duration
plugins {
id 'java'
}
group 'com.anma.gr'
version '1.0.0'
package main
import (
"net/http"
"os"
"bytes"
"path"
"path/filepath"
"mime/multipart"
"io"
module Main where
{-# LANGUAGE OverloadedStrings #-}
-- {-# LANGUAGE QuasiQuotes #-}
-- {-# LANGUAGE DeriveGeneric #-}
-- {-# LANGUAGE RecordWildCards #-}
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString.Lazy as DBL
#https://cloud.google.com/functions/docs/create-deploy-gcloud
gcloud functions deploy go-http-function \
--gen2 \
--runtime=go119 \
--region=REGION \
--source=. \
--entry-point=HelloGet \
--trigger-http \
--allow-unauthenticated
package main
import (
"fmt"
"net/http"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"
"crypto/tls"
"net"
)
package com.example.demo;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.ServerRequest;
# stack.yaml
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# https://docs.haskellstack.org/en/stable/yaml_configuration/
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages