Skip to content

Instantly share code, notes, and snippets.

View tmaxmax's full-sized avatar
🎯
Focusing

Teodor Maxim tmaxmax

🎯
Focusing
View GitHub Profile
@tmaxmax
tmaxmax / password_generator.c
Created April 13, 2020 08:17
C Password generator, with input overflow handling and memory allocation failure handling
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define TEO_PRINT_ERRORS 0
int strlen(char* str)
{
int len = 0;
@tmaxmax
tmaxmax / index.html
Last active April 17, 2020 10:18
Hide sidebar when user doesn't need it anymore in vanilla Javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
#!/usr/bin/env bash
error() {
>&2 echo $'\033[1;37mbmoisil: \033[1;31meroare: \033[0m'"$@"
}
HelpMenu() {
echo $'\033[1;37mbmoisil'
echo
echo "-h|--help - deschide acest meniu"
@tmaxmax
tmaxmax / marcus.ts
Created March 13, 2021 04:55
A string grid created using a Javascript generator
interface GridProps {
/**
* The number of columns the grid should have
*/
readonly columns: number
/**
* The number of rows the grid should have
*/
readonly rows: number
/**
@tmaxmax
tmaxmax / forward_list.hxx
Last active May 26, 2021 16:42
A linked list implementation in C++
#ifndef TEO_FORWARD_LIST_HXX_
#define TEO_FORWARD_LIST_HXX_
#include <algorithm>
#include <cstddef>
#include <cstring>
#include <iterator>
#include <numeric>
#include <stdexcept>
#include <type_traits>
cod județ
AB Alba
AG Argeș
AR Arad
B București
BC Bacău
BH Bihor
BN Bistrița-Năsăud
BR Brăila
BT Botoșani
@tmaxmax
tmaxmax / 📊 Weekly development breakdown
Last active January 9, 2022 12:13
Weekly development breakdown
SQL 7 hrs 44 mins ███████████████▓░░░░ 64.7%
Makefile 2 hrs 15 mins ██████▓░░░░░░░░░░░░░ 18.9%
TypeScript 39 mins ████░░░░░░░░░░░░░░░░ 5.5%
Other 26 mins ███▓░░░░░░░░░░░░░░░░ 3.6%
This file has been truncated, but you can view the full file.
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"27.0.3"},"message":"creating Importer singleton","sequence":1,"time":"2021-06-10T09:01:36.992Z"}
{"context":{"actualVersion":"27.0.4","expectedVersion":">=27.0.0 <28","logLevel":20,"namespace":"versions","package":"ts-jest","version":"27.0.3"},"message":"checking version of jest: OK","sequence":2,"time":"2021-06-10T09:01:37.036Z"}
{"context":{"logLevel":20,"namespace":"ts-jest-transformer","package":"ts-jest","version":"27.0.3"},"message":"created new transformer","sequence":3,"time":"2021-06-10T09:01:37.036Z"}
{"context":{"logLevel":20,"namespace":"ts-jest-transformer","package":"ts-jest","version":"27.0.3"},"message":"created new transformer","sequence":4,"time":"2021-06-10T09:01:37.056Z"}
{"context":{"logLevel":30,"namespace":"ts-jest-transformer","package":"ts-jest","version":"27.0.3"},"message":"no matching config-set found, creating a new one","sequence":5,"time":"2021-06-10T09:01:38.558Z"}
{"context":{"config":{"automock":f
@tmaxmax
tmaxmax / main.cpp
Last active July 5, 2021 14:00
The Cherno university assignment using the algorithms library - 2.07.2021
#include <algorithm>
#include <array>
#include <iostream>
#include <string>
#include <vector>
class DataStructure {
public:
bool insert(std::string data) noexcept {
auto entry = find(data, [](const Entry& e) {
@tmaxmax
tmaxmax / graf.hxx
Last active September 22, 2021 08:47
#ifndef TEO_GRAF_HXX
#define TEO_GRAF_HXX
#include <sstream>
#include <stdexcept>
template <int N>
class Graf {
public:
constexpr Graf()