This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basics": { | |
"name": "Andrii Maliuta", | |
"label": "Java developer", | |
"image": "", | |
"email": "[email protected]", | |
"phone": "", | |
"url": "https://linktr.ee/andmal/", | |
"summary": "Developing web services, CLI tools, integrations, Spring and Forge based apps for Atlassian Jira and Confluence Server, Data Center and Cloud", | |
"location": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============= 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-message-signatures | |
######### 1.0 | |
GET / HTTP/1.0 | |
GET /pub/WWW/TheProject.html HTTP/1.0 | |
POST /path HTTP/1.0 | |
Content-Type: application/json |