Skip to content

Instantly share code, notes, and snippets.

View spacecowb0y's full-sized avatar

Diego spacecowb0y

View GitHub Profile
WITH PriceExtremes AS (
SELECT
productoId,
MIN(CAST(precio AS REAL)) AS min_price,
MAX(CAST(precio AS REAL)) AS max_price
FROM Precios
GROUP BY productoId
)
SELECT
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
"product_uuid","product_name","min_price","max_price","price_variation_percentage","min_price_date","max_price_date"
"7790070409980","Gelatina Cereza Light Exquisita 25 Gr","19","974","5026.32","2023-09-24 19:13:11","2024-04-09 09:25:05"
"7791120031557","Arroz Largo Fino 00000 Molinos Ala 1 Kg","96","2574","2581.25","2023-09-24 19:13:11","2024-04-09 09:25:05"
"3083681003437","Arvejas Verdes Medianas sin TACC Bonduelle 200 Gr","106","2558","2313.21","2023-09-24 19:13:11","2024-04-09 09:25:05"
"3083681017656","Remolacha en Cubos Lata Bonduelle 400 Gr","308.7","7208","2234.95","2023-10-14 12:20:50","2024-04-09 09:25:05"
"7792798010714","Pack Cerveza Tenpack Stell Artois 10 Un 269 Ml","388","8679.96","2137.1","2023-12-11 19:29:56","2024-04-09 09:25:14"
"7792798012947","Cerveza Rubia en Lata Quilmes 473 Cc 6 Un","430","8281.06","1825.83","2023-12-11 19:29:56","2024-04-09 09:25:14"
"7792798005970","Cerveza Rubia Brahma 6 Un 473 Cc","463","8249","1681.64","2023-12-11 19:29:56","2024-04-09 09:25:14"
"7792798001712","
import "./App.css";
import "react-clock/dist/Clock.css";
import { useQuery, QueryClient, QueryClientProvider } from "react-query";
import { ReactQueryDevtools } from "react-query/devtools";
import TimeAgo from "react-timeago";
import L10nsStrings from "react-timeago/lib/language-strings/en-fuzzy-short";
import buildFormatter from "react-timeago/lib/formatters/buildFormatter";
import { useEffect, useState } from "react";
import Clock from "react-clock";
@spacecowb0y
spacecowb0y / day1.ts
Last active December 1, 2023 23:59
AOC 2023
interface Solutions {
part1: number;
part2: number;
}
export const solve = async (): Promise<{ solutions: Solutions }> => {
const input: string[] = (
await fetch(`https://adventofcode.com/2023/day/1/input`, {
headers: {
cookie: `session=${process.env.SESSION_TOKEN}`,
CREATE TABLE election_data (
año TEXT,
eleccion_tipo TEXT,
recuento_tipo TEXT,
padron_tipo TEXT,
distrito_id TEXT,
distrito_nombre TEXT,
seccionprovincial_id TEXT,
seccionprovincial_nombre TEXT,
seccion_id TEXT,

Are you a mirror?

So many people present themselves as mirrors. That's not, in and of itself, a bad thing. All people are reflections of the world around them. Can there even be a self devoid of others? How do we define ourselves if not in relation to those around us? The epidemic of modern reality is that, for many people, the self stops at reflection. We read something and regurgitate it. We see a trend and we copy it. Lately, I've been trying to behave more as a prism. Taking in the light around me and splitting into something new. Something colorful. I don't know if it is working. Perhaps I, like a talented counterfeiter, continue to produce better and better copies, fooling myself that I am creating something new.

#!/bin/bash
nix-collect-garbage -d
/run/current-system-bin/switch-to-configuration boot
{ config, libs, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
vim
];
system.stateVersion = "23.05";
imports =
[
<?php
/**
* PHPMailer SPL autoloader.
* PHP Version 5.0.0
* @package PHPMailer
* @link https://github.com/PHPMailer/PHPMailer/
* @author Marcus Bointon (coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
use reqwest::blocking::multipart;
use reqwest::blocking::Client;
use screenshots::Screen;
use std::{
io::Read,
time::{SystemTime, UNIX_EPOCH},
};
fn main() {
let screens = Screen::all().unwrap();
let client = Client::new();