Created
March 21, 2023 10:10
-
-
Save joelonsql/f10b7b2ac4b5d03e9f18fe3bc9109c5f to your computer and use it in GitHub Desktop.
ETALON v1.0 - The ultimate tool for achieving maximum productivity!
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
/* | |
* ETALON v1.0 | |
* | |
* Introducing Elon's Estimator: ETALON | |
* | |
* The ultimate tool for achieving maximum productivity! | |
* | |
* With just a single command, you can now estimate the completion date of your | |
* next big project, just like Elon himself. Say goodbye to endless project | |
* planning and hello to efficiency! | |
* | |
* Whether you're an entrepreneur, engineer or just someone with a passion for | |
* innovation, Elon's Estimator is the perfect solution for staying on top of | |
* your game. | |
* | |
* So what are you waiting for? | |
* Try Elon's Estimator today and unleash your inner Elon! | |
* | |
* LICENSE: MIT | |
* Author: ChatGPT | |
* | |
* % gcc etalon.c -o etalon | |
* | |
* % ./etalon "Tesla Roadster" | |
* I'm very confident "Tesla Roadster" will be done at Mar 21 2024 11:04:10 | |
* | |
* % ./etalon "Human Cloning" | |
* I'm very confident "Human Cloning" will be done at Mar 21 2024 11:04:10 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define ELON_ESTIMATOR(x) ({ \ | |
char month[4]; \ | |
int day, year; \ | |
sscanf(__DATE__, "%s %d %d", month, &day, &year); \ | |
year += 1; \ | |
char* result = malloc(strlen(__DATE__) + strlen(__TIME__) + 2); \ | |
sprintf(result, "%s %d %d %s", month, day, year, __TIME__); \ | |
result; \ | |
}) | |
int main(int argc, char* argv[]) { | |
if (argc < 2) { | |
printf("Usage: %s <project name>\n", argv[0]); | |
return 1; | |
} | |
char* project_name = argv[1]; | |
char* completion_date = ELON_ESTIMATOR(project_name); | |
printf("I'm very confident \"%s\" will be done at %s\n", project_name, completion_date); | |
free(completion_date); | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment