Skip to content

Instantly share code, notes, and snippets.

@lucasreta
lucasreta / cloudSettings
Last active April 8, 2022 15:58
VS Code Settings
{"lastUpload":"2022-04-08T15:57:57.709Z","extensionVersion":"v3.4.3"}

Keybase proof

I hereby claim:

  • I am lucasreta on github.
  • I am lucasreta (https://keybase.io/lucasreta) on keybase.
  • I have a public key ASB2z5Fqm4RTUFrKQ-8WCBtqDGPQ5QM9Nqu0cRGToMX-cQo

To claim this, I am signing this object:

@lucasreta
lucasreta / fecha.js
Last active July 17, 2020 00:34
GIST hecho por #AwsomEntrepriseCouding VIDEOS INCORPORATED todos los derechos RESERVADOS (pero codigo abierto y no recomendable)
// #AwsomEntrepriseCouding version 1.0
// mi clase de tiempo
bisi = (ano) => ano%400 == 0 || (ano%4 == 0 && ano%100 != 0)
messi = [null,31,28,31,30,31,30,31,31,30,31,30,31]
validate = (ano, mes, dia) => dia > 0 && ((mes == 2 && bisi(ano) && messi[mes]+1 >= dia) || ((!bisi(ano) || mes != 2) && messi[mes] >= dia))
class fecha {#ano;#mes;#dia; constructor(ano, mes, dia) { if (validate(ano,mes,dia)) {this.#ano=ano; this.#mes=mes; this.#dia=dia;} else {throw new Error('fecha invalida mostro')}} getdia(){return this.#dia} getmes(){return this.#mes} getano(){return this.#ano}}
@lucasreta
lucasreta / index.html
Created September 22, 2020 16:01
working with Chart.JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css" rel="stylesheet" />
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css" rel="stylesheet" type="text/css">
<title>Portfolio Review Overview</title>
@lucasreta
lucasreta / README.md
Created October 16, 2020 21:36
react-hello-world

Small gist to try and help answer a question in Stack Overflow.

Download the contents of the gist into a folder, open the terminal and navigate to said folder. Once inside the directory, run:

npx serve

This should start a local server in which the small Hello World application can be viewed.

@lucasreta
lucasreta / README.md
Last active October 16, 2020 23:31
php-login

Small gist for a Stack Overflow question about simple PHP login flow.

  • Download all files into a directory
  • Create a database named logintest
  • Create a table as the one described in users.sql
  • Replace login credentials in mysqli() for your own (both in signup.php and login.php)
  • Start a local server in the directory where the files exist: php -S 0.0.0.0:8888
  • Go to http://localhost:8888/signup.php and create a user
  • Go to http://localhost:8888/login.php and log in with email and password of created user
@lucasreta
lucasreta / cligol.c
Created December 3, 2020 09:30
reduced version of cligol's main.c file for medium article
#include "headers/config.h"
#include "headers/custom_string.h"
void compute (int neighbors[BOARD_HEIGHT][BOARD_WIDTH], int board[BOARD_HEIGHT][BOARD_WIDTH]);
void randomize (int board[BOARD_HEIGHT][BOARD_WIDTH]);
void clear () { printf ("\033[H\033[J"); }
void show (int board[BOARD_HEIGHT][BOARD_WIDTH]);
@lucasreta
lucasreta / gifeegol.sh
Last active December 4, 2020 02:29
embeddable version of gifeegol.sh for medium article
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR
./cligol/cligol
weekday=`date +"%w"`
today=`date +%Y-%m-%d`
@lucasreta
lucasreta / jwtRS256.sh
Created December 29, 2020 21:33 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
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
@lucasreta
lucasreta / vanilla-spa-index.html
Last active December 30, 2020 14:23
vanilla-spa
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Welcome | App Manual</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<header>