Skip to content

Instantly share code, notes, and snippets.

View ariedro's full-sized avatar
🤔

Ariel Aguirre ariedro

🤔
View GitHub Profile
const https = require("https");
const RETIRO_ID = 332;
const SUAREZ_ID = 190;
const appendSingleZero = (n) => `${n < 10 ? "0" : ""}${n}`;
https.get(
{ hostname: "ariedro.dev", path: "/api-trenes/estaciones/79/horarios" },
(res) => {
const rp = require("request-promise");
const csv = require("csvtojson/v2");
const REPO_URL =
"https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv";
const limit = process.argv[2];
const offset = process.argv[3] || 0;
if (!limit || isNaN(limit) || limit < 1)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef unsigned long long int numerito;
numerito string_to_uint(char *string) {
size_t length = strlen(string);
numerito res = 0;
for (size_t i = 0; i < length; i++)
# include <stdio.h>
# include <stdlib.h>
int main (int argc, char* argv[]) {
if(argc < 3) {
printf("Usage: offseter [FILE] [OFFSET]\n");
return 1;
}
unsigned char offset = atoi(argv[2]);
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define LEN 10
bool play() {
int numbers[LEN];
bool chosens[LEN];
for i in {$(((2**31 - `date +%s`) / 86400))..0}; do if [ $((i % 7)) -eq 6 ] || [ $((i % 7)) -eq 0 ]; then echo -n ░; elif [ $((i % 2)) -eq 0 ]; then echo -n ▒; elif echo -n ▓; done; echo
@ariedro
ariedro / ircolorizer.c
Created December 8, 2018 23:04
Color randomizer by word for IRC messages
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char* argv[]) {
srand(time(NULL));
int i = 0;
printf("/eval ");
while (argv[1][i] != '\0')
if (argv[1][i] == ' ' || i == 0)
#include <stdio.h>
int main(){
for (int y = 1900; y < 2100; y++)
for (int m = 1; m < 13; m++)
for (int d = 1; d < 32; d++)
for (int h = 0; h < 24; h++)
if (d * m * h == y) printf("%d-%d-%d\t%d:00\n",d,m,y,h);
return 0;
}