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
## GET request
GET / HTTP/1.1
User-agent: curl/2000
Host: example.com
## GET response
HTTP/1.1 200 OK
Server: example-server/1.1
Content-Length: 5
Content-Type: plain/text
module SleighAuthenticationSpec where
import SleighAuthentication (authenticate)
import Test.Hspec
import Test.QuickCheck
spec :: Spec
spec = do
describe "authenticate" $ do
it "should work for some examples" $ do
expectTrue $ authenticate "Santa Claus" "Ho Ho Ho!"
func (b *Bus) readAndUnpack() ([]byte, error) {
n, err := io.ReadAtLeast(b.port, b.buf[:], 2)
got := b.buf[:n]
if err != nil {
return nil, newError("libzzz: cannot read 2-byte preamble [got: % 02X] - error: %w", got, err)
}
if got[0] != magic_number {
return nil, newError("libzzz: bad MAGIC NUMBER in response - message starts with: [% 02X] (expected XX...)", got)
}
length := int(got[1])
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# Use the official lightweight Node.js 12 image.
# https://hub.docker.com/_/node
FROM node:12-slim
# Create and change to the app directory.
WORKDIR /usr/src/app
# Copy application dependency manifests to the container image.
# A wildcard is used to ensure copying both package.json AND package-lock.json (when available).
# Copying this first prevents re-running npm install on every code change.
package com.anma.java.core.nio;
import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.FileTime;
import java.util.EnumSet;
import static java.nio.file.FileVisitResult.CONTINUE;
import static java.nio.file.FileVisitResult.SKIP_SUBTREE;
use std::io::{Read, Write};
use std::{net, time};
use std::future::Future;
fn main() {
let port = 8084;
let server = net::TcpListener::bind(format!("127.0.0.1:{port}")).unwrap();
{
"basics":{
"name":"Andrii Maliuta",
"label":"Atlassian tools developer",
"image":"",
"email":"quadr988@gmail.com",
"phone":"",
"url":"https://linktr.ee/andmal/",
"summary":"Developing web, CLI, integrations, Spring Connect and Forge based apps for Atlassian Jira and Confluence Server, Data Center and Cloud",
"location":{
Lorem ipsum dolor sit amet consectetur adipiscing elit, at hendrerit sem torquent lacinia consequat condimentum blandit, eu sapien elementum pulvinar ac orci. Blandit natoque elementum nisl sagittis laoreet auctor donec fermentum, faucibus nullam lacus arcu dictumst justo cum lacinia litora, condimentum curae suscipit cursus montes phasellus taciti. Tempus nisi primis volutpat tincidunt neque semper pharetra nibh eleifend, aliquam pellentesque torquent vivamus bibendum feugiat aptent purus. Habitasse phasellus rutrum varius taciti vel imperdiet torquent, odio non iaculis urna ante congue, duis commodo malesuada turpis volutpat curabitur. Elementum dapibus habitasse libero duis ullamcorper blandit magnis euismod etiam semper, ut non egestas eget proin a sodales platea cursus, sem mattis tempor arcu aliquam fringilla taciti donec leo. Turpis nec etiam sed vivamus mollis curae inceptos rutrum, integer class nulla dis iaculis vitae ligula ultricies, tristique urna pulvinar litora vel morbi faucibus.
Sed proin ma
============= modes
v - visual
i, I, o, O, - insert
R - replace
c - change mode
C - change from position till end of line
Esc - quit mode
============= navigation