eksctl create cluster --name fargate --region us-east-1 --version 1.14 --fargate
[ℹ] eksctl version 0.11.1
[ℹ] using region us-east-1
[ℹ] setting availability zones to [us-east-1c us-east-1d]
[ℹ] subnets for us-east-1c - public:192.168.0.0/19 private:192.168.64.0/19
[ℹ] subnets for us-east-1d - public:192.168.32.0/19 private:192.168.96.0/19
[ℹ] using Kubernetes version 1.14
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
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
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
| //from Howard Hinnant's answer https://stackoverflow.com/a/18303787 | |
| #include <random> | |
| #include <chrono> | |
| #include <iostream> | |
| std::random_device eng; //can be used to generate random input for test cases | |
| std::uniform_int_distribution<std::size_t> random(500, 1000); | |
| //a function template that executes a given function object and returns |
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
| #pragma once | |
| #ifndef CONVOLUTION_H_INCLUDED | |
| #define CONVOLUTION_H_INCLUDED | |
| /** | |
| * Separable Convolution routines with SSE and NEON intrinsics | |
| * | |
| * this implementation is based on OpenCV Filter Class | |
| * with template optimizations and SIMD intrinsic | |
| * |
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
| // big endian bit stream | |
| export class BitWriter { | |
| constructor(buf = [], byte = 0, pos = 7) { | |
| this.byte = byte; | |
| this.pos = pos; | |
| this.buf = Array.from(buf); | |
| } | |
| writeBit(b) { | |
| this.byte |= (b & 1) << this.pos; | |
| this.pos--; |
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
| // -*- coding:utf-8; mode:c++; mode:auto-fill; fill-column:80; -*- | |
| /// @file sha256.cpp | |
| /// @brief Calculate and display the SHA-256 hash of a list of files. | |
| /// @author J. Arrieta <[email protected]> | |
| /// @date October 10, 2017 | |
| /// @copyright (c) 2017 Nabla Zero Labs | |
| /// @license MIT License | |
| /// | |
| /// Compiled in macOS High Sierra 10.13 (previous installation of OpenSSL 1.1.0). |
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 main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type Aaa struct { | |
| a string | |
| } |
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
| #include<iostream> | |
| #include<string> | |
| using namespace std; | |
| int *pre_kmp(string pattern) | |
| { | |
| int size = pattern.size(); | |
| int *pie=new int [size]; | |
| pie[0] = 0; |
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 (c) 2016 Jens Bissinger | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all |
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
| #!/usr/bin/env python3 | |
| """ | |
| Very simple HTTP server in python for logging requests | |
| Usage:: | |
| ./server.py [<port>] | |
| """ | |
| from http.server import BaseHTTPRequestHandler, HTTPServer | |
| import logging | |
| class S(BaseHTTPRequestHandler): |